Ad Widget

Collapse

Capturing short peak values in monitored value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dubak
    Junior Member
    • Nov 2016
    • 4

    #1

    Capturing short peak values in monitored value

    Hi,
    I would be very grateful for any ideas on solving the following issue:

    On a linux host I have a value that I want to monitor. I can access this Value in a python script or in bash. It is a "double"v value in the range 0.00 - 50.00.

    This value can change rapidly but also stay constant for long periods of time.
    I would like to be able to monitor/discover the short peaks in this value and possibly also have a long database history of these values.

    Basically my naive idea would be: The zabbix agent would only send the value to the server, when the value changes and the value would be saved in the database on the server not in constant intervals, but only when it changes.

    Can something like this be done with zabbix?
  • SBO
    Zabbix Certified Specialist
    Zabbix Certified Specialist
    • Sep 2015
    • 226

    #2
    Why don't you want the data to be stored ? I don't get it.

    Anyway, if you really want to do this, it would be easier to put it directly in your script.. You launch it, it gets the value and writes it in a temp file, next launch of the script, it compares the value it gets with the one in the temp file, and so on..

    Comment

    • dubak
      Junior Member
      • Nov 2016
      • 4

      #3
      Well, I already have a script that makes exactly that and writes the values to a plain text file.

      However, I wanted to use zabbix, mainly because of the fact, that the graphing tool and the database for storing the data is really great. And that allows me also to view the collected data in the web interface. Storing of the data is important, because I need to know, when the peaks happened (possibly 1 year back).

      So my question was basically, if there is a way how to tell the zabbix agent to send the monitored value to the server only in case the monitored value changes (e.g. from my bash script or from python,...)

      Actually something similar to snmptrap: if a given action happens (the value changes), please send the value to the server, which will save it with the timstamp in the database.

      Comment

      • SBO
        Zabbix Certified Specialist
        Zabbix Certified Specialist
        • Sep 2015
        • 226

        #4
        You can create that item on your zabbix server as a "Zabbix trapper".

        Then, in your script, when the value differs from the previous one, send the value through zabbix_sender (https://www.zabbix.com/documentation.../zabbix_sender)

        Comment

        • dubak
          Junior Member
          • Nov 2016
          • 4

          #5
          Originally posted by SBO
          You can create that item on your zabbix server as a "Zabbix trapper".

          Then, in your script, when the value differs from the previous one, send the value through zabbix_sender (https://www.zabbix.com/documentation.../zabbix_sender)
          OK, that sounds good. Many thanks, I'll give it a try!

          Comment

          • dubak
            Junior Member
            • Nov 2016
            • 4

            #6
            Originally posted by SBO
            You can create that item on your zabbix server as a "Zabbix trapper".

            Then, in your script, when the value differs from the previous one, send the value through zabbix_sender (https://www.zabbix.com/documentation.../zabbix_sender)
            works like a charm. Thanks a lot!

            Comment

            • SBO
              Zabbix Certified Specialist
              Zabbix Certified Specialist
              • Sep 2015
              • 226

              #7
              You're welcome

              Comment

              Working...