Quick zabbix setup without all the fuss.
Deploys a basic setup locally which is good enough to monitor the Jenkins infrastructure. This is a heavily modified form of https://github.com/zabbix/zabbix-docker
Some of the metrics that are we care about like the time taken to spawn a slave node is easiest obtained with a Jenkins file. Also,
- Tests the pipeline library, k8s java libs
- No need to write Java
- No need to understand the plugin architecture for now
- Time taken for some ops might be too long for a classic HTTP GET in a loop
- zabbix_send is pretty easy to understand once it works
The top level idea is to compute relevant values in a Jenkinsfile, send it with zabbix_send and run the job under cron.
$ docker-compose up
Login to http://0.0.0.0:8081 with creds Admin/zabbix
Add a host at 'Configuration > Hosts > Create Host'
Host name : rivendell
Groups : Linux Server worked for me.
Agent Interfaces : 127.0.0.1 / IP / 10051
Add an application
Name : Jenkins
Add an Item
Name : k8s.connect.time
Key : k8s.connect.time
Type : Zabbix Trapper
Allowed hosts : Your IP.
Application : Jenkins
Should be able to send data right now using the CLI
$ zabbix_sender -z '127.0.0.1' -p 10051 -s rivendell -k k8s.connect.time -o 240
High chance that something will go silly and this wont work. Logs can be viewed
with $ docker logs --follow zabbixdocker_zabbix-server_1
and it usually
contains something useful.
Please update this if you find any issues.