Automate collection of various zendesk ticket stats and send them to prometheus pushgateway
Currently the app only pushes total count of tickets based on its status and tag, see configuration example Tags and statuses must be specified, otherwise it will not ask for the count from Zendesk API. Pushgateway will receive following metrics
zendesk_tickets_status{job="zendesk-ticket-count",status="closed",tag="some_tag"} 996
zendesk_tickets_status{job="zendesk-ticket-count",status="new",tag="some_tag"} 0
[..]
zendesk_tickets_status{job="zendesk-ticket-count",status="closed",tag="someother_tag"} 3
[..]
- Clone github repo
git clone git@github.com:nepworldwide/nepms-zendesk-stats.git
cd nepms-zendesk-stats
- Python 3.7 or newer (might work on older 3.x versions)
- Deploy configuration template
cp config/config.sample.yml config/config.yml
- Update configuration file
config/config.yml
- Build docker image
make build
- Run it
make run
See above
- Create virtual environment and activate it
virtualenv venv
source venv/bin/activate
- Install dependencies with pip
pip install -r requirements.txt
- Run the script
python app/app.py
See config/config.sample.yml All settings must be present as the script will validate the JSON doc created by parsing the yml configuration file.
Change hub.mnw.no
This project is licensed under the MIT License - see the LICENSE file for details