https://github.com/mikeshultz/orccollector
Handy OpenTSDB collectors
https://github.com/mikeshultz/orccollector
Last synced: 12 months ago
JSON representation
Handy OpenTSDB collectors
- Host: GitHub
- URL: https://github.com/mikeshultz/orccollector
- Owner: mikeshultz
- Created: 2017-03-06T02:33:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-15T21:48:38.000Z (over 8 years ago)
- Last Synced: 2025-01-03T21:16:56.622Z (over 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# orccollector
Handy OpenTSDB collectors.
## Configuration
Make sure to add `/etc/orc.ini` or `~/.orc.ini` using the following as a sample:
[default]
interval = 10s
[otsdb]
host = localhost
port = 4242
qsize = 1000
host_tag = True
mps = 100
check_host = True
[sensu]
api_url = http://localhost:3000
Each module must have it's own section in the ini with its own
configuration. See the "[Modules](#modules)" section for more information.
## Install
`python setup.py install`
## Run
`orccollector` runs as a constant loop. You can run it standalone with
just the command `orccollector`. Alternatively, you can configure
supervisord to watch over the process.
### supervisord
Example configuration for supervisord.
[program:orccollector]
command=orccollector
stdout_logfile=/var/log/orccollector.log
stderr_logfile=/var/log/orccollector.error.log
stdout_logfile_maxbytes=5MB
stderr_logfile_maxbytes=5MB
## Modules
### Sensu
The sensu module collects information on client health and puts it into
OpenTSDB as the `sensu_status` metric. Configure the Sensu API base URL
in the `[sensu]` section in the ini file.
#### Config
[sensu]
api_url = http://localhost:3000
### DarkSky
[DarkSky](https://darksky.net/dev/) provides weather information via a
RESTful API. You can make up to 1000 calls per day to their API at no
charge.
#### Config
[darksky]
api_key = 0123456789abcdef
location_json = /path/to/weather_locations.json
interval = 30m
#### Location JSON
The location JSON file should be in a format like the following:
[
{
"name": "Philipsburg",
"lat": 46.3298812,
"lng": -113.3064933
},
{
"name": "Philadelphia",
"lat": 40.0046684,
"lng": -75.258115
}
]
**NOTE**: Make sure to pay attention to the interval so you don't go
above the amount of API calls you intend. 24 hours has 1440 seconds in
it so a call per second will hit that limit.