Nodejs module to count files in a directory and output alert triggers or metrics
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
README.md
package.json

README.md

npm-dir_count

metrics and checks for checking the number of files in a directory in nodejs output to graphite format for use via sensu or nagios

To get metrics output do bin/dir_count.js -m -s SCHEME_NAME -p PATH where SCHEME_NAME matches the prefix required by your system for graphite and PATH is the full path to the directory you want checked. If you want to exclude certain files then add '-e EXCLUDE' where EXCLUDE matches a filename of part of a file name you want excluded.

For Alert based checks you need to set both the critical and warning flags '-c' & '-w' instead of the metric flag '-m' to the levels at which you want the alerts raised.