Hello Everyone,
I want to pull interface utilization metrics from mysql DB and make it a daily report. Got bunch devices I am interested in, each of them has got few interfaces I would like to get metrics for. Graphs are showing all the info I would like to get from DB like max, min and avg values for In and Out octets. Where in DB I can find historical data for device XXX, interface YYY, date ZZZ. So far I was able to run something like below, but that doesn't give me any option to select historical data. I must say that I was browsing through whole DB table by table and I couldn't find anything related to previous dates.
My query:
select dev.sysName, dev.device_id, prt.port_id, prt.ifSpeed, prt.ifInOctets, prt.ifInOctets_rate, prt.ifInOctets_perc, prt.ifOutOctets, prt.ifOutOctets_rate, prt.ifOutOctets_perc from observium.devices as dev inner join observium.ports as prt on dev.device_id = prt.device_id where dev.sysName = 'XXX' and prt.port_label = 'Eth2'
Any help hips, guides are more than appreciated.
Regards, Piotr Kania CREDIT SUISSE (POLAND) SP. Z O.O. Credit Suisse CoE OPS Wroclaw | Monitoring & Instrumentation Solutions, MBHJ 711 Atrium 2 | Warsaw 00-849 | EMEA Phone +48 22 359 8668 piotr.kania@credit-suisse.commailto:piotr.kania@credit-suisse.com | www.credit-suisse.comhttp://www.credit-suisse.com =============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===============================================================================
Hi Piotr,
Graphed information are only extractable from local .rrd files on your hard drive which are containing all requested information. In SQL database you can only find last fetched information from last polling interval.
Mit freundlichem Gruß wilhelm.tel GmbH
Denis Klimek Carrier Manager & Professional Network Engineer IP-Systemtechnik Tel: +49 (0) 40 / 521 04 - 1049 -> Work From Home Mobil: +49 (0) 151 / 652 219 06
dklimek@stadtwerke-norderstedt.de www.wilhelm-tel.de
______________________________________________
[cid:image004.png@01D706D0.C26F0960]
Postanschrift: wilhelm.tel GmbH Heidbergstraße 101-111 22846 Norderstedt
Geschäftsführer: Jens Seedorff, Theo Weirich Vorsitzender des Aufsichtsrats: Christoph Mendel Handelsregister: HRB 4216 NO, Amtsgericht Kiel Umsatzsteuer ID: DE 81 299 7663
[ig]https://www.instagram.com/azubiteam/[fb]https://www.facebook.com/wilhelmtel.norderstedt/
Von: observium observium-bounces@observium.org Im Auftrag von Kania, Piotr via observium Gesendet: Freitag, 19. Februar 2021 14:36 An: observium@observium.org Cc: Kania, Piotr piotr.kania@credit-suisse.com Betreff: [Observium] Interface utilization metrics
Hello Everyone,
I want to pull interface utilization metrics from mysql DB and make it a daily report. Got bunch devices I am interested in, each of them has got few interfaces I would like to get metrics for. Graphs are showing all the info I would like to get from DB like max, min and avg values for In and Out octets. Where in DB I can find historical data for device XXX, interface YYY, date ZZZ. So far I was able to run something like below, but that doesn't give me any option to select historical data. I must say that I was browsing through whole DB table by table and I couldn't find anything related to previous dates.
My query:
select dev.sysName, dev.device_id, prt.port_id, prt.ifSpeed, prt.ifInOctets, prt.ifInOctets_rate, prt.ifInOctets_perc, prt.ifOutOctets, prt.ifOutOctets_rate, prt.ifOutOctets_perc from observium.devices as dev inner join observium.ports as prt on dev.device_id = prt.device_id where dev.sysName = 'XXX' and prt.port_label = 'Eth2'
Any help hips, guides are more than appreciated.
Regards, Piotr Kania CREDIT SUISSE (POLAND) SP. Z O.O. Credit Suisse CoE OPS Wroclaw | Monitoring & Instrumentation Solutions, MBHJ 711 Atrium 2 | Warsaw 00-849 | EMEA Phone +48 22 359 8668 piotr.kania@credit-suisse.commailto:piotr.kania@credit-suisse.com | www.credit-suisse.comhttp://www.credit-suisse.com
============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ==============================================================================
To get historical data (i.e. the data in a graph), youd need to generate a graph of the data with graph.php, but output it with format=json.
It might be slow, but itll probably work for your purposes. You can control what timeperiod you want the data for.
You can get an example graph.php URL by looking at the URL for a graph in the web interface.
Adam.
From: observium observium-bounces@observium.org On Behalf Of Klimek, Denis via observium Sent: 19 February 2021 14:06 To: Observium observium@observium.org Cc: Klimek, Denis DKlimek@Stadtwerke-Norderstedt.de Subject: Re: [Observium] Interface utilization metrics
Hi Piotr,
Graphed information are only extractable from local .rrd files on your hard drive which are containing all requested information.
In SQL database you can only find last fetched information from last polling interval.
Mit freundlichem Gruß
wilhelm.tel GmbH
Denis Klimek
Carrier Manager & Professional Network Engineer
IP-Systemtechnik
Tel: +49 (0) 40 / 521 04 1049 -> Work From Home
Mobil: +49 (0) 151 / 652 219 06
dklimek@stadtwerke-norderstedt.de
www.wilhelm-tel.de
______________________________________________
Postanschrift:
wilhelm.tel GmbH
Heidbergstraße 101-111
22846 Norderstedt
Geschäftsführer: Jens Seedorff, Theo Weirich
Vorsitzender des Aufsichtsrats: Christoph Mendel
Handelsregister: HRB 4216 NO, Amtsgericht Kiel
Umsatzsteuer ID: DE 81 299 7663
https://www.instagram.com/azubiteam/ https://www.facebook.com/wilhelmtel.norderstedt/
Von: observium <observium-bounces@observium.org mailto:observium-bounces@observium.org > Im Auftrag von Kania, Piotr via observium Gesendet: Freitag, 19. Februar 2021 14:36 An: observium@observium.org mailto:observium@observium.org Cc: Kania, Piotr <piotr.kania@credit-suisse.com mailto:piotr.kania@credit-suisse.com > Betreff: [Observium] Interface utilization metrics
Hello Everyone,
I want to pull interface utilization metrics from mysql DB and make it a daily report.
Got bunch devices I am interested in, each of them has got few interfaces I would like to get metrics for.
Graphs are showing all the info I would like to get from DB like max, min and avg values for In and Out octets.
Where in DB I can find historical data for device XXX, interface YYY, date ZZZ.
So far I was able to run something like below, but that doesnt give me any option to select historical data.
I must say that I was browsing through whole DB table by table and I couldnt find anything related to previous dates.
My query:
select dev.sysName,
dev.device_id,
prt.port_id,
prt.ifSpeed,
prt.ifInOctets,
prt.ifInOctets_rate,
prt.ifInOctets_perc,
prt.ifOutOctets,
prt.ifOutOctets_rate,
prt.ifOutOctets_perc
from observium.devices as dev
inner join observium.ports as prt on dev.device_id = prt.device_id
where dev.sysName = XXX
and prt.port_label = 'Eth2'
Any help hips, guides are more than appreciated.
Regards,
Piotr Kania CREDIT SUISSE (POLAND) SP. Z O.O. Credit Suisse CoE OPS Wroclaw | Monitoring & Instrumentation Solutions, MBHJ 711 Atrium 2 | Warsaw 00-849 | EMEA Phone +48 22 359 8668 mailto:piotr.kania@credit-suisse.com piotr.kania@credit-suisse.com | http://www.credit-suisse.com www.credit-suisse.com
============================================================================ == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================ ==
participants (3)
-
Adam Armstrong
-
Kania, Piotr
-
Klimek, Denis