Ad Widget

Collapse

Simple agentd check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pietro54
    Senior Member
    • Feb 2011
    • 112

    #1

    Simple agentd check

    Hi, im trying to check my zabbix agent on server.
    I made a simple check
    {hostname:agent.ping.last(0)}=0
    But when i turn off zabbix agent by killall zabix_agentd then my trigger isent working.
    What I am doing wrong?
    i need to check if zabbix a gent is working properly.
  • Davidus
    Senior Member
    • Dec 2010
    • 281

    #2
    ITEM
    Type: Zabbix agent
    Key: proc.num[zabbix_agentd]
    Data type: Decimal


    TRIGGER
    Code:
    {Zabbix server:proc.num[zabbix_agentd].last(0)}<1

    Comment

    • Davidus
      Senior Member
      • Dec 2010
      • 281

      #3
      Following trigger will fire up in case if your zabbix agent goes down

      Comment

      • ahowell
        Member
        • Jan 2011
        • 66

        #4
        Originally posted by Davidus
        Following trigger will fire up in case if your zabbix agent goes down
        How would a agent check trigger if the agent isn't running.

        Comment

        • Davidus
          Senior Member
          • Dec 2010
          • 281

          #5
          my apologies, I guess i misunderstood something

          Comment

          • Davidus
            Senior Member
            • Dec 2010
            • 281

            #6
            Quick workaround: set up NO DATA trigger

            Comment

            • pietro54
              Senior Member
              • Feb 2011
              • 112

              #7
              Davidus can you write more about it?
              or give a link or sth?
              Im i bit new in Zabbix and i dont know what mean No data trigger.
              I dont know why my all trggers linked to specific host arent going to be red when zabbix_agent is down or i will reboot whole mahine.
              All trigers are still green(ofc i set trigers to disaster)

              Comment

              • Davidus
                Senior Member
                • Dec 2010
                • 281

                #8
                I`m not using nodata triggers personally, therefore, cannot provide real life example.
                You can find information on nodata function here
                Last edited by Davidus; 12-06-2012, 07:33.

                Comment

                • pietro54
                  Senior Member
                  • Feb 2011
                  • 112

                  #9
                  Ok, i made a trigger,
                  {Linux:agent.ping.nodata(35)}=0
                  still working bad, now i got all "red"
                  My item colect data form host evry 30second.
                  Im monitoring 2 hosts, like i said, both got status disater, but in one of host agent is alive, on another one agent is dead.
                  How are you checking your zabbix agent is still alive?
                  Last edited by pietro54; 12-06-2012, 07:37.

                  Comment

                  • Davidus
                    Senior Member
                    • Dec 2010
                    • 281

                    #10
                    Being honest I`m not checking if zabbix agent is alive, I`m not using zabbix agent at all.
                    try
                    Code:
                    {Linux:agent.ping.nodata(30)}=1

                    Comment

                    • pietro54
                      Senior Member
                      • Feb 2011
                      • 112

                      #11
                      Ur right. It was logical problem. Should be 1 after =.
                      Thank You.

                      But please tell me, how to figth with the problem i see.
                      If zabbix agent is down rest of the trigers wont work, lets think about checking if Tomcat is alive.
                      Item:
                      proc.num[java]
                      Triger:
                      proc.num[java].last(0)}<1
                      After i kill zabbix agent,
                      It wont tell me the Tomcat is down when zabbix agent is down.
                      Maybe you got some solution?

                      Comment

                      • Davidus
                        Senior Member
                        • Dec 2010
                        • 281

                        #12
                        Another quck workaround
                        You can setup remote command on nodata trigger (as an action), which will execute some external script(s)
                        external script might look like this (linux)
                        Code:
                        service zabbix_agend stop
                        service zabbix_agend start

                        Comment

                        • pietro54
                          Senior Member
                          • Feb 2011
                          • 112

                          #13
                          Thats good idea, i read about howto execute comand.

                          So maybe u can help me with another problem, when whole machine is down then how to make all triggers (that belong to this host) goest to toher state, lets say to "warrning"?

                          Im asking becouse i can just make dependencies to one trigger with no data state.
                          But i saw zabbix instance without making all thoes dependencies.

                          Comment

                          • Davidus
                            Senior Member
                            • Dec 2010
                            • 281

                            #14
                            You can do this without setting up trigger dependency; you just have to add nodata function to your trigger. OK, I might talk nonhuman now
                            Perhaps, the example would make much more sense rather than my words

                            Following trigger will fire up if Configured max number of processes is too low (less then 256) on Zabbix server OR NODATA for 30 seconds

                            Code:
                            {Zabbix server:kernel.maxproc.last(0)}<256|{Zabbix server:kernel.maxproc.nodata(30)}=1
                            NOTE:
                            In case you decide to use this method, please consider that, sometimes its hard to understand which condition actually fired up trigger. From example above, trigger might be fired up because first condition turned true
                            Code:
                            {Zabbix server:kernel.maxproc.last(0)}<256
                            or
                            Code:
                            {Zabbix server:kernel.maxproc.nodata(30)}=1
                            Hope this info is helpful

                            Comment

                            • pietro54
                              Senior Member
                              • Feb 2011
                              • 112

                              #15
                              Yes, this very helful
                              Thank You again.

                              Im wonder about one thing, i got in my company old zabbix, 1.6.1 This is very old instace, that zabbix was created by my colleague that desent work now. I cant ask him now how he does, that all triggers goes to other stat. Becouse in triggers menu there are only one condicion and they are independet to each other.
                              Maybe u got some clue wher to search?

                              Comment

                              Working...