Ad Widget

Collapse

Monitoring sites with a simple ping - how to

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eseltzer
    Junior Member
    • Aug 2005
    • 8

    #1

    Monitoring sites with a simple ping - how to

    I am trying to use zabbix to monitor about 240 remote sites. I would like to ping the sites, if they are down for more than 5 minutes or so I would like an email or text page to go out. Will zabbix do this. Does a comprehensive guide exist to get someone through this?

    Thanks,
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,

    Yes, Zabbix is very good at this. Very simple steps to get this going;

    Go into the Zabbix frontend and select configuration -> hosts.

    Scroll down near the bottom, you will find a form for adding hosts. At this point, you want to create a template for simplification. For hostname, use something like '__Remote_Hosts', then down at then select the drop down where it shows Monitored. Change this to Template.

    Then click Add.

    When the page reloads, click on the '__Remote_Hosts' host, this will bring up a list of items that are currently being monitored. At present there should be none.

    Next, you use the form to create a ping item for the '__Remote_Hosts' template.

    In the description field, just use something like 'Remote Ping'

    Leave the Host field alone, this field will be updated automagically when you begin linking hosts to this template

    For type, you want to use 'Simple check' and then for the key, you want to use icmpping.

    Skip units and use multiplier, and move to update interval. This simply controls the periodicity of the checks, I recommend something like 30 - 45 here. Then click 'Add'

    Next we move on to creating the trigger against this items. Click on 'Triggers' up near the top. On the right hand, near the top, you will see a drop down for hosts. Use the drop down and select '__Remote_Hosts'. This will bring up a list of the triggers associated with this host. At present there should be none.

    In the form, create a description, something like '{HOSTNAME} -- Failed Ping Check'.

    For expression, you want to use something like;
    Code:
    {__Remote_Hosts:icmpping.max(300)}<1
    Choose a severity level, then click add. You're almost done. Next you want to click on 'Actions' next to your new trigger. This will allow you to configure your email alert.

    From the 'Send message to' drop down, choose whether you wnt this email to go to a group or to an individual.
    From the 'User' or 'Group' drop down, choose which user or group you want the alert to go to.
    Change the 'Subject' to '{HOSTNAME} -- Failed Ping Check' Then click add.

    Okay, now you add the individual hosts, very similar to the way you created the first template. The only difference is this time, instead of choosing template in the dropdown, you use 'Monitored' and for the last drop down, you select '__Remote_Hosts' as the template. Click add and you are done.

    I hope this helps.

    EDIT: Corrected the trigger.
    Last edited by James Wells; 07-09-2005, 05:44.
    Unofficial Zabbix Developer

    Comment

    • troyadams
      Junior Member
      • Sep 2005
      • 4

      #3
      Im pretty much trying to do the same thing. I have followed your steps, but the ping check just sits in the queue. Any ideas??

      Also on the host, what port number do i use. The host is not running an agent (its a cisco router)

      Comment

      • James Wells
        Senior Member
        • Jun 2005
        • 664

        #4
        Originally posted by troyadams
        Im pretty much trying to do the same thing. I have followed your steps, but the ping check just sits in the queue. Any ideas??

        Also on the host, what port number do i use. The host is not running an agent (its a cisco router)
        The simple check icmpping uses the fping utility, if that utility does not exist on your server, then the checks will just sit in the queue like you are seeing. If fping does exist, and you have the path set correctly in your zabbix_server.conf file, then the next thing to check is if you have a firewall blocking the pings.

        Also this monitor, as configured, uses the standard ICMP ping, as such, you only need to allow ICMP traffic through the firewall. Most Cisco routers are configured to respond to pings by default.
        Unofficial Zabbix Developer

        Comment

        • troyadams
          Junior Member
          • Sep 2005
          • 4

          #5
          Great, thanks for the info. I will give that a go.

          So i dont need to worry about the port on the host config screen? I.E Just leave the port at 10000.

          Comment

          • James Wells
            Senior Member
            • Jun 2005
            • 664

            #6
            Originally posted by troyadams
            So i dont need to worry about the port on the host config screen? I.E Just leave the port at 10000.
            If all you are doing is ping checks, then no, no need to change the port. Keep in mind that ping uses the ICMP protocol. which doesn't use ports, as most people think of them.
            Unofficial Zabbix Developer

            Comment

            • eseltzer
              Junior Member
              • Aug 2005
              • 8

              #7
              I did the above and did not get any errors. Nothing in the queue, how do I confirm it is working? Also where do I set up all the users and smtp info?

              Comment

              • James Wells
                Senior Member
                • Jun 2005
                • 664

                #8
                One of the ways you can check to see if it is working is to go to view -> latest data. On the right hand side, you will see a drop down list, select one of the hosts you are checking, then in the drop down to the right of it, select data. This will show you if it is working.

                As for setting up users, you go to configuration -> users and add the users there.
                Unofficial Zabbix Developer

                Comment

                • bdub
                  Junior Member
                  • Apr 2006
                  • 24

                  #9
                  James,

                  Thanks much for the howto. I'm running the 1.9b and attempted to follow your instructions, however I've run into a snag. Everytime I try to create the trigger, I get the following error:

                  No such host (_Remote_Hosts) or monitored parameter (icmpping)

                  I've followed your instructions more or less exactly, including using the same name _Remote_Hosts. I believe that your instructions might have been geared to 1.0, so I might have missed something.

                  When I check under hosts -> templates, I can see the _Remote_Hosts template, so I don't think thats whats giving the error. Did the icmpping parameter change names in the beta?

                  Thanks for any help you can give me.

                  brian

                  Comment

                  • bdub
                    Junior Member
                    • Apr 2006
                    • 24

                    #10
                    disregard my post. All I had to do to notice I misspelled my key in the item was open my mouth in a public forum...

                    Thanks again for the howto james.


                    brian

                    Comment

                    • Db0
                      Junior Member
                      • May 2006
                      • 14

                      #11
                      Originally posted by James Wells
                      Code:
                      {__Remote_Hosts:icmpping.max(300)}<1
                      For some reason this does not work for me. When I change the trigger I've been using until now (icmpping.last(0)<1) to this, the trigger status is set to unknown and it never becomes false or true. Any ideas why?

                      Comment

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

                        #12
                        What is type of the ICMPPING item? There is a known issues with evaluation of aggregate functions having integer values. Please wait for 1.1beta10.
                        Alexei Vladishev
                        Creator of Zabbix, Product manager
                        New York | Tokyo | Riga
                        My Twitter

                        Comment

                        • lifezard
                          Junior Member
                          • May 2006
                          • 5

                          #13
                          Originally posted by Db0
                          For some reason this does not work for me. When I change the trigger I've been using until now (icmpping.last(0)<1) to this, the trigger status is set to unknown and it never becomes false or true. Any ideas why?
                          Hi,

                          I think I am facing the same problem as well. (I m monitoring a couple of Quintums in my case)

                          While Latest Values does show 1 or 0 for icmpping checks depending whether the machine s on or off, the Trigger section (I set it to {server:icmpping.max(500)}=0) will forever remain unknown)

                          As I need to distinguish situation when the whole thing is down or just a reboot, I ve made a bit of adjustment... by setting the interval to longer period and modifying the expression a bit:
                          ({Quintum1:icmpping.last(0)}<1)&({Quintum1:icmppin g.prev(0)}<1)

                          I still hope the original will work though eventually though

                          Comment

                          • Db0
                            Junior Member
                            • May 2006
                            • 14

                            #14
                            I personaly solved it by using a float value for the ping item

                            Comment

                            • zeroger
                              Junior Member
                              • Dec 2012
                              • 3

                              #15
                              I have a little trouble with icmpping

                              I'm running the 2.0.3 Stable, when I used for Expression something like;

                              {__Remote_Hosts:icmpping.max(300)}<1

                              I choose a severity level, then click add. The system show this message: Incorrect item key "icmpping" provided for trigger expression on "__Remote_Hosts".


                              Note: I used icmpping at item key.

                              Comment

                              Working...