I am a Oracle DBA and I have written a couple of different LLD discovery rules because we want to monitor different things depending on whether it is a primary database (ex. redo gaps) or a standby database (ex. MRP enabled). Some of our dev machines will occasionally have a mix of primary and standby databases (for example when we do a switchover to standby for maintenance on the primary). Anyway, this is why we need the LLD rules to be flexible.
The problem is when a machine only has standby databases or only has primary databases. On a host with only primary databases the standby discovery rule doesn't return anything at all to the agent, and therefore Zabbix complains that "Value should be a JSON object." Conversely on hosts with only standby databases the primary discover rule doesn't discover anything and therefore returns nothing to the agent, so in Zabbix the primary LLD discover rule complains with the same message. Is there a graceful way to tell Zabbix "Hey, there is nothing discovered here at the moment so just move along"? I tried sending back a pair of empty strings in JSON format instead of nothing at all, and it really didn't like that and disabled the discovery rule. By sending back nothing the rule stays enabled, but has a red X for status. But it would be nice to see that everything is happy with a green check mark if possible.
This newbie would appreciate any advice!
The problem is when a machine only has standby databases or only has primary databases. On a host with only primary databases the standby discovery rule doesn't return anything at all to the agent, and therefore Zabbix complains that "Value should be a JSON object." Conversely on hosts with only standby databases the primary discover rule doesn't discover anything and therefore returns nothing to the agent, so in Zabbix the primary LLD discover rule complains with the same message. Is there a graceful way to tell Zabbix "Hey, there is nothing discovered here at the moment so just move along"? I tried sending back a pair of empty strings in JSON format instead of nothing at all, and it really didn't like that and disabled the discovery rule. By sending back nothing the rule stays enabled, but has a red X for status. But it would be nice to see that everything is happy with a green check mark if possible.
This newbie would appreciate any advice!

Comment