zabbix-tooling / zabbix-agent-extensions

zabbix-agent-extensions
GNU General Public License v2.0
111 stars 45 forks source link

Monitoring other hosts than localhost #25

Closed bilbolodz closed 4 years ago

bilbolodz commented 5 years ago

Added parameter {$HOSTNAME} to specify monitored host (other than localhost)

scoopex commented 5 years ago

Thanks for the merge request.

Two things:

bilbolodz commented 5 years ago

For some reasons (config of apache is beyond my role) your script is not working with "127.0.0.1" but IS working with localhost:

/usr/local/lib/zabbix/externalscripts/zabbix_check_apache-mod-status total 85 127.0.0.1 FAIL: Unable to get scoreboard FAIL /usr/local/lib/zabbix/externalscripts/zabbix_check_apache-mod-status total 85 localhost Scoreboard: _W_._W____._.................................................................................................................................................................................................................................................... 256

That's why I need to put hostname into parameters. Of course it could be "fixed" in script code, but I think it's not a good idea.

According 3.4 vs 4.0 zabbix template versions unfortunately I'm working on Zabbix 4.0.

scoopex commented 4 years ago

Sorry, i would like to take this, but you change changes also the template, which creates problems with existing installations. Applying the change to a existing installation create a second set of apache items. Therefore you might search for a solution with lower impact or by shareing the zabbix /server-status on 127.0.0.1.