using zabbix 2.4.5 sia
I'm trying to automate the installation of zabbix agents on monitored hosts - but sadly had no luck yet. The idea is following: check an ip range for ICMP and open 10050 ports and if a host has successful ping but closed port, trigger an "autoinstall" action (a "winexe" external script - but that's not so important).
Here's how I do it:
- first i made an autodiscovery rule - scan an ip range 10.20.30-40.100 (the last digit is always 100)
- check for ping and open tcp port 10050
- then added an new entry in actions section with various conditions:
1) "check = ping" AND "check != tcp(10050)"
2) "state unavailable/lost/discovered" AND "check eq tcp(10050)"
...and many, many others...
- finally added what should be done on this condition
simply add the host to the "discovered hosts" group
I tried five or six different conditions - none worked. No hosts are added to the group.
In the "Monitoring"-"Discovery" I see the discovered hosts, "ping" fiels are all green, but the TCP(10050) is green only on hosts with an installed zabbix agent. Hosts without an installed zabbix agent got this field empty - without any color or comment. So I assume, that if this port is closed or filtered (not open), the check does not generate any kind of event. And without an event it is useless to play with action conditions.
So here's my question: is this an unresolvable problem?
Maybe there is a way to customize the discovery checks/scripts and the events they generate, or even redifine the autodiscovery events?
I'm trying to automate the installation of zabbix agents on monitored hosts - but sadly had no luck yet. The idea is following: check an ip range for ICMP and open 10050 ports and if a host has successful ping but closed port, trigger an "autoinstall" action (a "winexe" external script - but that's not so important).
Here's how I do it:
- first i made an autodiscovery rule - scan an ip range 10.20.30-40.100 (the last digit is always 100)
- check for ping and open tcp port 10050
- then added an new entry in actions section with various conditions:
1) "check = ping" AND "check != tcp(10050)"
2) "state unavailable/lost/discovered" AND "check eq tcp(10050)"
...and many, many others...
- finally added what should be done on this condition
simply add the host to the "discovered hosts" group
I tried five or six different conditions - none worked. No hosts are added to the group.
In the "Monitoring"-"Discovery" I see the discovered hosts, "ping" fiels are all green, but the TCP(10050) is green only on hosts with an installed zabbix agent. Hosts without an installed zabbix agent got this field empty - without any color or comment. So I assume, that if this port is closed or filtered (not open), the check does not generate any kind of event. And without an event it is useless to play with action conditions.
So here's my question: is this an unresolvable problem?
Maybe there is a way to customize the discovery checks/scripts and the events they generate, or even redifine the autodiscovery events?
Comment