Hello all,
I'm discovering Zabbix (5.4) since few months and have happily done some basic monitoring of manually added host.
Since few days, I would like to use the Discovery rules to detect the different type of host running on my network and automatically assign them to different host groups.
I have a rules that is scanning my 10.130.3.x range for HTTP, Ping and SSH which seems to run as expected.
Now I have added discovery actions that assign:
Host to group A if HTTP and Ping are up
Condition is: (And)
- Discovery check equals 10.130.3.x : HTTP
- Discovery check equals 10.130.3.x : ICMP Ping
- Discovery status equals Up
Operations:
- Add to host groups A
Host to group B if SSH and Ping are up
Condition is: (And)
- Discovery check equals 10.130.3.x : SSH
- Discovery check equals 10.130.3.x : ICMP Ping
- Discovery status equals Up
Operations:
- Add to host groups B
but nothing is added to any group...
It seems according to the documentation that each checks generates a different event, so the AND condition is probably never true as it is not possible to have HTTP + Ping Up at the same time.
So my questions are:
- Did I properly understand how Discovery and discovery actions conditions are managed ?
- How can I achieve my goal to assign host to different groups based on the detected service running ?
Maybe I have used the wrong tools and Discovery has a different goal, so feel free to suggest other way to do it!
Ideally, if I can add host to a group based on a shell script results to do some custom analysis of the host, it could be very nice but I'm not sure it is possible.
Kind regards
I'm discovering Zabbix (5.4) since few months and have happily done some basic monitoring of manually added host.
Since few days, I would like to use the Discovery rules to detect the different type of host running on my network and automatically assign them to different host groups.
I have a rules that is scanning my 10.130.3.x range for HTTP, Ping and SSH which seems to run as expected.
Now I have added discovery actions that assign:
Host to group A if HTTP and Ping are up
Condition is: (And)
- Discovery check equals 10.130.3.x : HTTP
- Discovery check equals 10.130.3.x : ICMP Ping
- Discovery status equals Up
Operations:
- Add to host groups A
Host to group B if SSH and Ping are up
Condition is: (And)
- Discovery check equals 10.130.3.x : SSH
- Discovery check equals 10.130.3.x : ICMP Ping
- Discovery status equals Up
Operations:
- Add to host groups B
but nothing is added to any group...
It seems according to the documentation that each checks generates a different event, so the AND condition is probably never true as it is not possible to have HTTP + Ping Up at the same time.
So my questions are:
- Did I properly understand how Discovery and discovery actions conditions are managed ?
- How can I achieve my goal to assign host to different groups based on the detected service running ?
Maybe I have used the wrong tools and Discovery has a different goal, so feel free to suggest other way to do it!
Ideally, if I can add host to a group based on a shell script results to do some custom analysis of the host, it could be very nice but I'm not sure it is possible.
Kind regards