Ad Widget

Collapse

How do I change "OFF" and "ON" to "UP" and "DOWN" or anything else I like?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • noxis
    Senior Member
    • Aug 2007
    • 145

    #1

    How do I change "OFF" and "ON" to "UP" and "DOWN" or anything else I like?

    The "reverse logic" that is part of the Zabbix monitoring is confusing when first confronted with it. Traditionally with monitoring when an alert is going on (like a burglar alarm) it is "set off", saying that apache is ON when its actually down (or in fact http is now off) ... you can see why it gets confusing.

    So my question, is there a way to change this to UP and DOWN? So ON = DOWN and OFF = UP ?

    Thanks (Hope that's not too confusing!)
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #2
    I see what you mean. I have just gotten use it it (DOWN=ON and UP=OFF).

    A few ideas:
    1. Change your actions so that {STATUS} is replaced with ON/OFF. You might have to have separate actions for this.

    2. Edit the following in en_gb.inc.php:
    'S_ON'=> 'ON',
    'S_OFF'=> 'OFF',

    3. Modify the source code and recompile so that {STATUS} = UP/DOWN instead of ON/OFF.

    4. Train your brain to think like Zabbix.
    Unofficial Zabbix Expert
    Blog, Corporate Site

    Comment

    • noxis
      Senior Member
      • Aug 2007
      • 145

      #3
      Originally posted by infinity005
      I see what you mean. I have just gotten use it it (DOWN=ON and UP=OFF).

      A few ideas:
      1. Change your actions so that {STATUS} is replaced with ON/OFF. You might have to have separate actions for this.

      2. Edit the following in en_gb.inc.php:
      'S_ON'=> 'ON',
      'S_OFF'=> 'OFF',

      3. Modify the source code and recompile so that {STATUS} = UP/DOWN instead of ON/OFF.

      4. Train your brain to think like Zabbix.
      Well my first instinct was to change the source, but I didn't know the implications if I did so, for instance any code that relies on it literally being the word "ON" or "OFF".

      Comment

      • noxis
        Senior Member
        • Aug 2007
        • 145

        #4
        Ok! I have made a change to src/zabbix_server/expressions.c on lines 1119 and 1128. Can someone confirm for me (Alex?) That this is the right place and will not have any impact anywhere else?

        Also Alex, would it be possible in the next version to have the option of changing this or specifying it in the zabbix_server.conf ? It seems quite cosmetic and shallow but for people moving to Zabbix from something like Nagios its a pretty important thing.

        I am the Sysadmin investigating and rolling Zabbix out but its our 24/7 NOC team that will be staring at this all day every day and night.

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          Originally posted by noxis
          The "reverse logic" that is part of the Zabbix monitoring is confusing when first confronted with it. Traditionally with monitoring when an alert is going on (like a burglar alarm) it is "set off", saying that apache is ON when its actually down (or in fact http is now off) ... you can see why it gets confusing.

          So my question, is there a way to change this to UP and DOWN? So ON = DOWN and OFF = UP ?

          Thanks (Hope that's not too confusing!)
          It can already be done without modification of ZABBIX code.

          Instead of using {STATUS} use {{HOSTNAME}:status.last(0)}. Make sure that item 'status' (or any else) has Value Mapping assigned, so that numeric will be replaces by normal text (UP, DOWN, ...).
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          Working...