Ad Widget

Collapse

"status key" Initial Value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RadicaLover
    Junior Member
    • Sep 2005
    • 7

    #1

    "status key" Initial Value

    Hi

    I'm using a item with the key "status" and i have a trigger associate to them ("Host is Down!").
    In one map i use this trigger with the link to that host.
    So have the problem that the initial value of the trigger is unknown because the item only changes to 2 when the host is down!

    So how can we initialize the item/trigger to the initial value be not unknown (FALSE)????????????

    Help Please!
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,

    There are two main ways to do this;
    1. Create the trigger, then stop agent on the client machine until the server picks it up, then restart the agent. While not an optimal solution, this is the recommended way of doing it.
    2. Manually edit the triggers table in the Zabbix database and change the value for this trigger from 0 to 1. I don't really recommend this method, though for large sites is it often the best way to do it.
    Unofficial Zabbix Developer

    Comment

    • RadicaLover
      Junior Member
      • Sep 2005
      • 7

      #3
      Ok! Thanks for the answer!

      Thats what i use, but to do it in real time monitoring, where the monitoring people dont understand anything from networks and zabbix configuration, is not the best way...

      P.S. - The client machine doesn't have a agent.... (just replies snmp)
      Last edited by RadicaLover; 21-09-2005, 10:44.

      Comment

      • cohagen
        Junior Member
        • Sep 2005
        • 11

        #4
        Originally posted by James Wells
        Greetings,

        There are two main ways to do this;
        1. Create the trigger, then stop agent on the client machine until the server picks it up, then restart the agent. While not an optimal solution, this is the recommended way of doing it.
        2. Manually edit the triggers table in the Zabbix database and change the value for this trigger from 0 to 1. I don't really recommend this method, though for large sites is it often the best way to do it.
        Hello James,

        The problem does not seem to be with the Triggers values... it's with the "status" Item defaulting to nodata until a change happens to the host.

        This is so annoying! I want to be alerted when a server goes down! This should be easy, and I should not have to do pings to figure it out if I am already monitoring the host. Also I should not have to bring down the agent or the host itself to rectify the problem.

        Argh! Zabbix is wonderful but this is really annoying. Please someone help.

        Cohagen

        Comment

        • James Wells
          Senior Member
          • Jun 2005
          • 664

          #5
          Originally posted by cohagen
          This is so annoying! I want to be alerted when a server goes down! This should be easy, and I should not have to do pings to figure it out if I am already monitoring the host. Also I should not have to bring down the agent or the host itself to rectify the problem.
          Yes, and no.

          Status is a calculated item, As long as the server is able to contact the agent, then the status will either be 0, for unknown, or 1 for up. If the server loses the ability to talk to the agent, for any reason, then status get's recalculated to 2. When you first add a server, the status item gets set to 0, and will not change until the server loses communication with the agent.

          While this can be an annoyance, I suspect there are people out there making use of the 0 status.
          Unofficial Zabbix Developer

          Comment

          • cohagen
            Junior Member
            • Sep 2005
            • 11

            #6
            In looking very briefly at the DB, would this solve the problem:

            update items set lastvalue = 0 where
            key_ = "status";

            Is that safe to do, and would it solve the problem?

            To elaborate my problem, I have a group of hosts in a cluster for example. I want to use something like:

            ({node1.status.last(0)}=2) | ({node1.status.last(0)}=2) | ...

            Only way this works is if I stop each one? That means a lot of production playing around that I don't want to do.

            Any ideas?

            Comment

            • cohagen
              Junior Member
              • Sep 2005
              • 11

              #7
              Originally posted by James Wells
              When you first add a server, the status item gets set to 0, and will not change until the server loses communication with the agent.

              While this can be an annoyance, I suspect there are people out there making use of the 0 status.
              James,

              If the default value of the "status" was a "0" or a "1" that would be great! But it's not... it's "nodata" or in the "items" table the "lastvalue" column is NULL.

              The problem is the "status" item is by default undefined... making any trigger based on this value useless. It it started in some defined state, like a zero, one or two, then the trigger would work as it should.

              Am I correct? Is "lastvalue" the column that defines the current state of an item?

              Cohagen

              Comment

              • James Wells
                Senior Member
                • Jun 2005
                • 664

                #8
                Originally posted by cohagen
                James,

                If the default value of the "status" was a "0" or a "1" that would be great! But it's not... it's "nodata" or in the "items" table the "lastvalue" column is NULL.
                Hmmm, this may be something new to 1.1beta1, I will look into this.

                The problem is the "status" item is by default undefined... making any trigger based on this value useless. It it started in some defined state, like a zero, one or two, then the trigger would work as it should.
                Just tested this and had no issues with lastvalue being undefined. Will double check this on my network at home when I get a chance this evening.

                Am I correct? Is "lastvalue" the column that defines the current state of an item?
                You are correct.
                Unofficial Zabbix Developer

                Comment

                • cohagen
                  Junior Member
                  • Sep 2005
                  • 11

                  #9
                  Hello,

                  I tried changing the "lastvalue" of items with "key_" = "status" but it seemed to mess zabbix up, so I restored the DB back to earlier today.

                  Am I crazy or is this an incredibly annoying issue with Zabbix? Is the only way to monitor whether a host is up/down in zabbix to either:

                  1. Ping host.
                  2. Use status item... but before this works, you must force host to be unreachable before it works properly.

                  Is this accurate? Is there some other way? Should I just unplug the ethernet of my Zabbix server and force all hosts to be unreachable everytime I add a "status" item?

                  Lame!

                  Comment

                  • RadicaLover
                    Junior Member
                    • Sep 2005
                    • 7

                    #10
                    Yes, it's that.
                    This isn't new in 1.1B.
                    If somebody knows a way to start "status" diferent from unknow, say.....

                    Comment

                    Working...