By beinghuman
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!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
My Icinga instance seems to have a slightly different path, but this works as expected for me:
curl -u user:pass "http://example.com/cgi-bin/icinga/status.cgi?host=localhost&csvoutput"
The quotes around the URL are important. Looks like that might be what you are missing.
For more info on exporting data from Icinga, check out this wiki entry on their site.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.