Ad Widget

Collapse

Graphing and Reporting on SNMP Trap values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickpiggott
    Junior Member
    • Jan 2023
    • 4

    #1

    Graphing and Reporting on SNMP Trap values

    Hello

    I'm monitoring radio transmitters, which often have short (<1m) outages, so I rely on SNMP traps to get an accurate picture of uptime.

    It's a very simple trap, which returns the numeric value 1 if the transmitter is ok, and 2 if it's not ok. I am successfully receiving those traps, and using regex to extract 1 or 2, and storing that as an Numeric (Unsigned) value. It's creating triggers which in turn are sending me notifications of change of state.

    If I look at at Recent Data for a Host, I can see a date/time for each trap event, and the numeric value.

    I have two things I can't work how to achieve:
    • How to graph these values as a continuous line graph - currently they appear just as points at the time of each event, and no line connecting each point
    • How to create an uptime report - currently it doesn't appear to calculating in the time between the events
    Any advice gratefully received.

    Nick


  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    You see dots and not a line because there are not enough points for the selected time period to build a line.
    There are different graph... Use the new type (SVG) - there you can select the display options in more detail https://www.zabbix.com/documentation.../graphs/custom

    You can use "Service monitoring" to get a report of work\not work time. https://www.zabbix.com/documentation...al/it_services

    Comment

    • nickpiggott
      Junior Member
      • Jan 2023
      • 4

      #3
      That's helpful, thank you.

      I am still struggling to get graphs to display as I'd like. Here's my sequence of values from an SNMP trap
      2023-01-26 15:33:16 1
      2023-01-26 15:33:14 2
      2023-01-26 14:42:12 1
      2023-01-26 14:42:07 2
      2023-01-26 13:39:20 1
      2023-01-26 13:39:18 2
      2023-01-26 13:39:16 1
      2023-01-26 13:39:15 2
      2023-01-26 13:38:06 1
      2023-01-26 13:37:50 2
      2023-01-26 09:28:07 1
      2023-01-26 09:27:50 2
      2023-01-26 09:25:39 1
      2023-01-26 09:25:23 2
      2023-01-26 09:25:17 2
      2023-01-26 09:25:15 1
      2023-01-26 09:25:05 2
      2023-01-26 09:23:42 1
      2023-01-26 09:23:38 2
      2023-01-26 09:23:36 1
      2023-01-26 09:23:35 2
      2023-01-26 08:59:37 1
      2023-01-26 08:59:35 2
      2023-01-26 08:59:33 1
      2023-01-25 23:00:31 1
      2023-01-25 23:00:25 2
      2023-01-24 23:09:44 1
      2023-01-24 23:09:41 2
      2023-01-24 18:03:11 1
      2023-01-24 18:03:09 2
      2023-01-24 18:03:07 1
      2023-01-24 18:03:05 2
      2023-01-24 17:44:33 1
      2023-01-24 17:44:03 2

      1 is good, 2 is an error condition. As you can see, quite a few 2 second error conditions, which causes "glitches" on-air.

      This is how my graph is configured

      Click image for larger version

Name:	image.png
Views:	1001
Size:	34.3 KB
ID:	458353

      but it renders as

      Click image for larger version

Name:	image.png
Views:	969
Size:	13.1 KB
ID:	458354

      So it doesn't show lines between the data points, and it seems to really want to "average" the values in between.
      I did also try with the new graphs available on the dashboard, and hit the same problem - for example

      Click image for larger version

Name:	image.png
Views:	974
Size:	13.5 KB
ID:	458355

      persisting with showing an odd 1.5 value, which represents the average of all the received data.

      I can't seem to find any option which would just give me a "square" line graph, where the value of the line represents the most recently received value on the trap.

      Thanks

      Nick

      Comment


      • Shivigo
        Shivigo commented
        Editing a comment
        How did You make it? I can`t add item to the my graph because this is SNMP trat type, but I have a VALUES
        2023-02-01 23:46:53
        1
        2023-02-01 23:43:30
        1
        2023-02-01 23:40:07
        1
        2023-02-01 23:36:46
        1
        2023-02-01 23:33:23
        1
        2023-02-01 23:30:01
        1
    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #4
      You have 6 values within 1.5 minutes and your graph range is almost an hour... I guess it looks OK for a graph... It does not know the values outside of drawn graph, so it cannot really draw lines to edges... It might look better if you select timeframe from 13:35-13:40... The points will be spread more over the graph area, lines will be better.
      I am not sure about those averages... It may just rely on trends to draw lines where there is no data... for 25th you seem to have only 2 datapoints... And they are very close, so it is impossible to draw those 2 points on a 3 day graph, you don't have enough pixels on screen ..

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #5
        You can try changing these options and see how the graph will be drawn.
        Click image for larger version

Name:	z1.png
Views:	980
Size:	12.6 KB
ID:	458399
        Click image for larger version

Name:	z2.png
Views:	963
Size:	10.2 KB
ID:	458400

        Comment

        • nickpiggott
          Junior Member
          • Jan 2023
          • 4

          #6
          Thanks for that suggestion Hamardaban

          If I set the Missing Data to "Connected" or "Last Known", and set the History Data Selection to "History", the problem still seems to be that you can't turn approximation off.

          For that data series above, with Approximation to "AVG", I get

          Click image for larger version  Name:	image.png Views:	0 Size:	14.5 KB ID:	458430

          So it's averaged out the values to give a somewhat unhelpful "1.5-ish" value most of the time. If I set Approximation to "Max", it gives me "2" most of the time

          Click image for larger version  Name:	image.png Views:	0 Size:	13.7 KB ID:	458431

          And with it set to "ALL"

          Click image for larger version  Name:	image.png Views:	0 Size:	16.3 KB ID:	458432
          I get a hybrid version of min, max and ave - but not what I'm looking for.

          Ideally I want to turn "Approximation" off entirely, but there's no option to do that?

          I appreciate that part of the problem is that the values are changing quickly (2-5 seconds between them), so don't make sense at a very long timescale. If I zoom into those 3 hours on 26th January where there were a number of brief events, it'll still hiding them through approximattion

          Click image for larger version  Name:	image.png Views:	0 Size:	13.4 KB ID:	458435

          I might be trying to do the impossible - to visualise small intermittent breaks in the data set.

          Thanks for your suggestions, they're appreciated.


          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #7
            IIRC, even item type has some influence on drawing a graph... trapper type items somehow manage to draw a line to edge of graph... but others not..:P I played around with your data a little bit, as trapper items...

            Click image for larger version  Name:	trap.png Views:	0 Size:	29.8 KB ID:	458452

            But I am pretty sure, most of the drawing issues are caused by data being so scarce...

            Comment

            Working...