Ad Widget

Collapse

Probing Zabbix server? Please help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nightstrike.lalith
    Junior Member
    • May 2008
    • 7

    #1

    Probing Zabbix server? Please help!

    Can someone tell me how I can check if Zabbix Server is really working? Something beyond 'ps -A' ? I want to be sure if it's listening on it's port, and trying to monitor hosts and doing so successfully. I want to do this from the commandline. Please help!
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    you could try telnetting to port 10051 (zabbix server port).
    that at least will show whether it accepts incoming connections from active agents.
    i'm not sure whether there's an easy way to determine whether data is coming in from cli, except maybe wget/curl/links/lynx
    Zabbix 3.0 Network Monitoring book

    Comment

    • nelsonab
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2006
      • 1233

      #3
      This is a tough one. You could also do something like this in Mysql

      select * from history where clock>(unix_timestamp()-60);

      However when I run this on my system it's a very expensive query, when it really shouldn't. It's only returning the values from the last 60 seconds. I wonder if adding a index for clock would help.

      The biggest problem is how do you detect if one of the threads is stuck? The best way I've found to detect this is to watch the queue.
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment

      • nightstrike.lalith
        Junior Member
        • May 2008
        • 7

        #4
        Telnet

        Thanks guys, here's what I have in mind.

        Here's what I have in mind:

        A two stage probe, which checks one after the following:

        1) Checking to see if Zabbix is listening to the respective port and accepting connections from agents.

        2) Check to see if Zabbix is writing to the database, by somehow finding out the timestamp of last access, comparing it with the current system timestamp, and then checking to see if the difference is normal or abnormal. We'd have to write rules for all four kinds of databases.

        And yes, seems like checking if all threads are working is the main difficulty :|

        Keep the ideas flowing guys, so I can finally get down to coding this thing!

        Cheers!

        Comment

        • vhm3
          Junior Member
          • Jun 2008
          • 13

          #5
          Originally posted by nelsonab
          However when I run this on my system it's a very expensive query, when it really shouldn't. It's only returning the values from the last 60 seconds. I wonder if adding a index for clock would help.
          Thanks for your suggestion on watching the history. I added an index on the clock field from the history table. On a table size of roughly 5 million records, my query went down from ~15 second average, to less than .1 second.

          Thank you,

          Chip

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #6
            Originally posted by vhm3
            Thanks for your suggestion on watching the history. I added an index on the clock field from the history table. On a table size of roughly 5 million records, my query went down from ~15 second average, to less than .1 second.

            Thank you,

            Chip
            How long did it take to add the index? I'm thinking of doing it but I think I'm going to have to wait until I move my DB to new disks. 74 Million rows might take a while.

            Have you noticed any improvement in graph performance? I would not expect it as graph queries use the existing double column index.
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            • troffasky
              Senior Member
              • Jul 2008
              • 567

              #7
              Originally posted by nightstrike.lalith
              I want to be sure if it's listening on it's port,
              'lsof -i | grep LISTEN' will show you what is processes are listening and on what ports.

              Comment

              • vhm3
                Junior Member
                • Jun 2008
                • 13

                #8
                Originally posted by nelsonab
                How long did it take to add the index? I'm thinking of doing it but I think I'm going to have to wait until I move my DB to new disks. 74 Million rows might take a while.

                Have you noticed any improvement in graph performance? I would not expect it as graph queries use the existing double column index.
                Hello Nelson,

                Yes, you might want to wait on adding the index. it was about 45 seconds to do it, from what I remember. With 74 million rows, that would be much much longer. As far as any performance improvements in graphing, I've noticed none.

                Chip

                Comment

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

                  #9
                  Be aware that any new index will REDUCE database performance! Don't do that.
                  Alexei Vladishev
                  Creator of Zabbix, Product manager
                  New York | Tokyo | Riga
                  My Twitter

                  Comment

                  Working...