Ad Widget

Collapse

Zabbix server script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • christogouws
    Junior Member
    • Nov 2009
    • 20

    #1

    Zabbix server script

    I have a script that checks if zabbix server is running,
    by checking if the process is running & checking the PID file.

    My problem is, every now & then the zabbix server freezes,
    which means the PID is present & the process is running.

    How can I check that the zabbix_server is responding?


    The process freezes due to some network configuration,
    its not a bug or misconfiguration.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    hmm. freezing should be fixed, though
    as a really fancy way you could send a value with zabbix_sender, make zabbix server do something upon receiving the value (like creating some file).
    then check whether the file exists after some 10 seconds. if yes, delete it and sleep.

    if not, something's wrong.
    Zabbix 3.0 Network Monitoring book

    Comment

    • christogouws
      Junior Member
      • Nov 2009
      • 20

      #3
      Great Idea

      Originally posted by richlv
      hmm. freezing should be fixed, though
      as a really fancy way you could send a value with zabbix_sender, make zabbix server do something upon receiving the value (like creating some file).
      then check whether the file exists after some 10 seconds. if yes, delete it and sleep.

      if not, something's wrong.

      Thanks, that sounds like a good idea, I'll give it a try.
      Zabbix is running as a VM & in the message log I get alot of:

      Mar 11 22:31:10 zabbix kernel: ad0: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=23022943

      I think that's whats causing the freezing.

      Comment

      • christogouws
        Junior Member
        • Nov 2009
        • 20

        #4
        confused

        Your idea sounds great, but after a few mins, I realized that I don't
        understand how to implement it

        Isn't the zabbix_sender a way to manually pull values from clients?

        Could you please give me a some more details as how to implement it?

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #5
          Originally posted by christogouws
          Zabbix is running as a VM & in the message log I get alot of:

          Mar 11 22:31:10 zabbix kernel: ad0: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=23022943

          I think that's whats causing the freezing.
          if that was on real hw, i'd say "change your hdd, quick". in a vm... well, probably some i/o problem.
          Zabbix 3.0 Network Monitoring book

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            Originally posted by christogouws
            Your idea sounds great, but after a few mins, I realized that I don't
            understand how to implement it

            Isn't the zabbix_sender a way to manually pull values from clients?

            Could you please give me a some more details as how to implement it?
            sender is used to push data to zabbix. zabbix_get is used to... well... get data

            so you would create trapper item, push data with sender in it. create alert based on that which runs custom script and creates a file. that's about it, see manual for details.
            Zabbix 3.0 Network Monitoring book

            Comment

            • christogouws
              Junior Member
              • Nov 2009
              • 20

              #7
              Ok, think I understand.

              I created a trapper item for the host,
              I send data to the item with zabbix_sender & it displays correctly under latest data.

              I configured a trigger for it, if nodata for 30secons, which seems to work.
              I created a action that executes a script for me, but
              it seems even though the trigger gets called, it never performs the
              action?

              Is there perhaps some problem, where you cant set up actions for zabbix trappers, because that doesn't make sense.

              Comment

              • richlv
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Oct 2005
                • 3112

                #8
                that should, of course, work - but that's a different problem. search the forum for common issues. most likely you have some misconfiguration in your users who are supposed to receive the notification (like missing/incorrect media etcc)
                Zabbix 3.0 Network Monitoring book

                Comment

                Working...