Ad Widget

Collapse

Exporting reports for monthly bandwidth usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • primerose
    Junior Member
    • Oct 2011
    • 4

    #1

    Exporting reports for monthly bandwidth usage

    Hello everyone,

    I'm quite new to Zabbix. I want to generate a report to get the total bandwidth usage for a snmp enabled host for the entire month. If anyone can help me with that I will be very thankful.
    Pls advise me on this.

    I'm using zabbix version 1.8 and the snmp device I'm trying to monitor is a router.

    I’m using the snmp OID 1.3.6.1.2.1.2.2.1.10.23 with “ifInOctets23” as the key to get the inbound bandwidth. And I’m using the same OID with “ifOutOctets23” as the key to get the outbound bandwidth.
    What I want to do is to get the total bandwidth usage report for a month for this Router. I wouldn’t mind writing a script to get it from the database. I want instructions to get the monthly reports step by step as I’m quite new to zabbix and network monitoring.

    I have created seperate graphs for inbound and outbound bandwidth usage. But I do not know how to export the graphs or how to access the backend (DB) to retrieve the stats so that I can generate the graphs using a php script at-least.

    I have attached a screen-shot of one graph I've got.

    I would be very grateful if anyone could assist me with this.

    Thanks a lot,
  • skarllot
    Junior Member
    • Oct 2011
    • 21

    #2
    All that I have are some SQL files. I haven't prepared to external use.


    - zabbix_dw: database schema to store report events.
    - fill_availability_events: procedure to fill data from `events_values` to `availability_events`.
    - get_availability_list(NULL, '2011-11-01', NULL, 'monthly'): Outputs availability to all hosts.
    - get_availability(@id, NULL, '2011-11-01', 'monthly', NULL): Outputs availability to specific host.

    Comment

    • primerose
      Junior Member
      • Oct 2011
      • 4

      #3
      Thank you very much indeed. I wrote a script to export the queried results to a csv file and had it mailed to me to get the monthly bandwidth usage.

      I used this query hopefully it's the one I am suppose to use.

      "select * from history where itemid = 22799 and clock between UNIX_TIMESTAMP('2011-10-18 00:00:00') and UNIX_TIMESTAMP('2011-11-01 00:00:00');"

      If you could kindly give me an advice if it looks ok.
      And is it possible for me to create different users with limited access levels? so that I can give a customer an user account where he can view the graphs himself but not other details. As in is it possible to customize views (preferably the front end view with only read permissions) for a particular user group?

      Thanks a lot for the help Skarllot

      Comment

      Working...