How to import or export nagios host Data from command line

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
[email protected]
Posts: 1
Joined: Wed Feb 11, 2015 4:47 pm

How to import or export nagios host Data from command line

Post by [email protected] »

This might be a basic question for some of you but being a beginner i wanted to know how to export or import data of the current status(CPU, Memory, Diskspace etc) of the host from command line into a CSV/JSON/XML format. THis is to provide daily reports in a readable format to our management team. Below is brief of what we are running,

We have a nagios server in the backend and we are using Icinga on the frontend to see host status, graphs etc. On the Icinga when i check the current status of the host i do see an option to "Export to CSV" in the browser but i wanted to get this data from the command line so i can automate this process for multiple hosts. Is there a way to simply run some commands and download the current status of a host(Windows or Linux) from command line?

Thanks and any help will be much appreciated!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to import or export nagios host Data from command li

Post by abrist »

Well, if you are running core 4, you can use the json api or the query handler. What version of core are you running?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked