Page 1 of 1
Extract data of monitored server
Posted: Tue Mar 05, 2019 9:10 am
by anilgupta
Team,
We are looking to extract performance data of the monitored servers.
We would like to push it to our Central Data Repository (CDR) and generate monthly/quarterly reports.
I understand that this data is stored in RRD.
What are the options to fetch this data?
Re: Extract data of monitored server
Posted: Tue Mar 05, 2019 2:02 pm
by cdienger
The rrd files are stored in /usr/local/nagios/share/perfdata/<hostname>/ and you can copy the files from there or you can use the API to export the rrd data. API options are available under Help > REST API Docs > Objects Reference.
Re: Extract data of monitored server
Posted: Wed Mar 06, 2019 9:20 am
by anilgupta
Hello cdienger,
Thanks for your response. I am trying the curl from the same server, still it takes around 40 seconds and finally throws HTTP code 504.
Can you please comment on this?
Code: Select all
[guptaa@pstvmpkimon02 ~]$ hostname -i
fe80::20c:29ff:feba:1509%ens192 192.168.0.162 192.168.122.1
[guptaa@pstvmpkimon02 ~]$ date;curl -XGET "https://192.168.0.162/nagiosxi/api/v1/objects/hoststatus?apikey=SANITIZEDTEXTVALUE&pretty=1"; date
Wed Mar 6 09:14:17 EST 2019
curl: (56) Received HTTP code 504 from proxy after CONNECT
Wed Mar 6 09:15:32 EST 2019
Re: Extract data of monitored server
Posted: Wed Mar 06, 2019 10:28 am
by cdienger
Run the command so that it doesn't go through a proxy. Try adding the following to the curl command:
--noproxy 192.168.0.162
Re: Extract data of monitored server
Posted: Wed Mar 06, 2019 1:42 pm
by anilgupta
It works, Thanks cdienger!!!
Re: Extract data of monitored server
Posted: Wed Mar 06, 2019 1:50 pm
by cdienger
Glad to hear! Are we okay locking this one up?