Ad Widget

Collapse

Flipping a received value from 0 to 1 and vice-versa

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheHorseman1976
    Junior Member
    • Jul 2018
    • 2

    #1

    Flipping a received value from 0 to 1 and vice-versa

    Greetings,

    I am monitoring several routers via SNMP and I need to send the result of the [icmpping] key to a third party application, only I need to "flip" the response around so that if [ICMPPING] returns a '1' I want Zabbix to store a '0' and vice-versa.

    Yes I know this sounds weird, but the application in question has certain things that work using an "ascending logic" so I would need my offline value to be '1' instead of a '0'.

    Could I achieve this through Calculated Items or Dependent Items? Like putting the normal result into an Item and them creating either based on that item?

    I tried to make sense of the documentation and honestly couldn't make any progress.

    Any help would be greatly appreciated.
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Originally posted by TheHorseman1976
    Greetings,

    I am monitoring several routers via SNMP and I need to send the result of the [icmpping] key to a third party application, only I need to "flip" the response around so that if [ICMPPING] returns a '1' I want Zabbix to store a '0' and vice-versa.

    Yes I know this sounds weird, but the application in question has certain things that work using an "ascending logic" so I would need my offline value to be '1' instead of a '0'.

    Could I achieve this through Calculated Items or Dependent Items? Like putting the normal result into an Item and them creating either based on that item?

    I tried to make sense of the documentation and honestly couldn't make any progress.

    Any help would be greatly appreciated.
    Hi,

    You can use external check or custom script (user.parameter in the Zabbix Agent):



    Also don't forget to invert the trigger expression: 0 - ok, 1 - problem.

    Comment

    Working...