Dear Team:
Does anyone know how do I export to a CSV file the complete list of host and services of each host that are being monitored in a Nagios Core?
Regards,
Export Host & Services to CSV
Export Host & Services to CSV
Last edited by mpedros on Fri Jun 15, 2018 10:59 am, edited 1 time in total.
Martin Pedros
Re: Export Host & Services to CSV
You can use the JSON CGIs to get a list:
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
If you're using a recent Nagios Core version, the CGIs should already be available; No installation needed.
Converting the resulting JSON to CSV is pretty easy from there. There's plenty of online converters that will do it for you.
Or if you're on Nagios Core 3, you could parse status.dat with some clever sed/awk/grep to convert parts of that into CSV.
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
If you're using a recent Nagios Core version, the CGIs should already be available; No installation needed.
Converting the resulting JSON to CSV is pretty easy from there. There's plenty of online converters that will do it for you.
Or if you're on Nagios Core 3, you could parse status.dat with some clever sed/awk/grep to convert parts of that into CSV.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Export Host & Services to CSV
Dear mcapra:
Thank you very much for your help, I'm going to investigate how to do with the link that you sent me. I will update with the news.
Regards,
Thank you very much for your help, I'm going to investigate how to do with the link that you sent me. I will update with the news.
Regards,
Martin Pedros
Re: Export Host & Services to CSV
Dear mcapra:
Excellent tool, I did not know it. I think it will help me. Thank you so much for everything!
Regards,
Excellent tool, I did not know it. I think it will help me. Thank you so much for everything!
Regards,
Martin Pedros
Re: Export Host & Services to CSV
The solution populated by @mcapra is OK for me. Can close this thread.
Martin Pedros