README
Prometheus Cron Exporter
An exporter built to report various metrics of cron jobs by parsing the syslog files writen to by crond
Installation
Using the repository
- Run
$ yarn
to install dependencies - Run the tests with
$ yarn test
- Build the exporter with
$ yarn build
- Run
$ node ./build/index.js
Via npm package
- Run
$ yarn global add @skroutz/cron-exporter
- The binary should be installed under
$ <PATH_TO_YOUR_NODE_MODULES>/.bin/cron-exporter
Configuration
The exporter can be configured using environment variables
Variable | Description | Default Value |
---|---|---|
CE_HOST |
The host that the app should respond to | undefined |
CE_PORT |
The port to run the exporter | 6748 |
CE_PREFIX |
Metric prefix for prometheus | '' |
CE_APPEND_TIMESTAMP |
Wether the metric should also be timestamped | true |
CE_ENDPOINT |
Endpoint that the exporter responds to | '/metrics' |
CE_LOGFILE |
Logfile to parse data from | '/var/log/cron.log' |
CE_COLLECT_INTERVAL |
Interval of the collecting process in milliseconds | 5 |