Page 1 of 2
Nagios XI report on Recent added Hosts
Posted: Tue Nov 09, 2021 2:45 pm
by ITOMB_IMT
Hi,
We are looking for a report to have recently added/removed hosts from Nagios XI in the past 'N' days. i looked up on reports and i dont find anything on that. Please help me in a way to generate a report.
Thanks,
Re: Nagios XI report on Recent added Hosts
Posted: Wed Nov 10, 2021 11:19 am
by benjaminsmith
Hi ITOMB_IMT,
In the web interface, go to Admin > System Information > Audit Log, and then choose Core Config Manager for the source. You should see a list of changes to the configuration such as when objects were added or removed.
audit-log-add-remove.png
Let us know if that helps.
--Benjamin
Re: Nagios XI report on Recent added Hosts
Posted: Wed Nov 10, 2021 12:31 pm
by ITOMB_IMT
This is good to view, but am looking for a report with just number on how many servers added and it to scheduled, so management can have overview on adding and decommissioning. IS there a way?
Re: Nagios XI report on Recent added Hosts
Posted: Wed Nov 10, 2021 6:06 pm
by benjaminsmith
Hi,
The best option would be to click the Download button in the upper right and download the info as a CSV file and import it into a spreadsheet for analysis.
Hope that helps and let us know if you have any questions.
--Benjamin
Re: Nagios XI report on Recent added Hosts
Posted: Thu Nov 11, 2021 4:18 pm
by ITOMB_IMT
Hi,
we are looking for an automated report that sends that our organization email address. If the report doesn't work, is there a way i can query MySQL database and collect the required information for hosts added in last 30 days? if so what database i need to query? if possible can you post the query too.
Thanks,
Re: Nagios XI report on Recent added Hosts
Posted: Fri Nov 12, 2021 10:52 am
by benjaminsmith
Hi,
It's stored in the
nagiosxi database in the xi_auditlog table. Here's the table structure to assist with the required SQL query.
audit-log-table.png
A simple command to pull everything:
Code: Select all
echo "select * from xi_auditlog;" | mysql -u root -pnagiosxi nagiosxi
You could pipe this to grep and reduce this down to the desired output or modify the SQL syntax.
Regards,
Benjamin
Re: Nagios XI report on Recent added Hosts
Posted: Mon Jan 10, 2022 10:00 am
by ITOMB_IMT
Thanks for the information. I tried to query the database you provided, but it has provided me information from "2021-07-14 10:56:01" but nothing from before. from which database can i find the whole information on total servers added till date?
Re: Nagios XI report on Recent added Hosts
Posted: Mon Jan 10, 2022 11:49 am
by gsmith
Hi
The age of entries kept for the audit log are set via Admin, Performance, Databases, NDO Database, Max Log Entries Age.
The default for this is 90 days, I am guessing yours is set for 180 days, so this is the limitation you are running into.
The functionality/data you are looking for does not exist. You would need to come up with a "home-grown" solution
to track the addition/deletion of hosts by date.
Thanks
Re: Nagios XI report on Recent added Hosts
Posted: Wed Feb 09, 2022 3:16 pm
by ITOMB_IMT
Thanks,
I have one more question. How can i am trying to a customize report showing all the details displayed in Host Status Summary. May i know ho can i get the numbers displayed for my report, by querying database? Which database i have to query for required output.
Thanks again.
Re: Nagios XI report on Recent added Hosts
Posted: Thu Feb 10, 2022 10:44 am
by gsmith
Hi,
While this isn't querying the database, you might get the information you need from the API.
Take a look at Help, then pick "Objects Reference" on the left-hand menu under "API Docs",
and pick "GET objects/host" from the right-hand side.
Image006.png
Please let me know what you think, and if I can close this thread.
Thank you!