It's been a while since I thought about this design, but I finally had time to implement it the proper way, and "just in time" as I needed recently to migrate our for our Puppet environments (multiple ones). For full automation between configuration management and monitoring, you need some "glue". The idea is that whatever you describe at the configuration management level should be authoritative and so automatically configuring the monitoring solution you have in place in your Infra.
In our case, that means that we have Foreman/puppet on one side, and on each node, store that in another , so I had to use an intermediate step that other tools can also use/abuse for the same reason.
The other reason also is that I admit that I'm a fan of "event driven" configuration change, so my idea was :
- update a host in Foreman (or groups of hosts, etc)
- publish that change on a secure network through a message queue (so asynchronous so that it doesn't slow down the foreman update operation itself)
- let Zabbix server know that change and apply it (like linking a template to a host)
So the good news is that it can be done really easily with several components :
- , a very lightweight MQTT broker/pub/sub client
- , and then create your scripts. There are some examples for Bash and python in the dedicated days :-)
Zabbix-cli
While one can always discuss
For people interested in using it on CentOS 6 or 7, I built the packages and they are on CBS
So I plumbed it in a systemd unit file that subscribe to specific MQTT topic, parse the needed informations (like hostname and zabbix templates to link, unlink, etc) and then it updates that in Zabbix itself (from the log output):
[+] 20170516-11:43 : Adding zabbix template "Template CentOS - https SSL Cert Check External" to host "dev-registry.lon1.centos.org"
[Done]: Templates Template CentOS - https SSL Cert Check External ({"templateid":"10105"}) linked to these hosts: dev-registry.lon1.centos.org ({"hostid":"10174"})
Cool, so now I don't have to worry about forgetting to tie a zabbix template to a host , as it's now done automatically. No need to say that the deployment of those tools was of course automated and coming from Puppet/foreman :-)
↗ Original-Artikel auf arrfab.net lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf arrfab.net.
SOCIAL SHARE CARD GENERATOR