Page 1 of 1
Importing servers into CCM
Posted: Mon Dec 11, 2023 12:40 pm
by dlally
Hello all,
I'm very new to Nagios and in the process of automating nagios monitoring of clients with puppet. What is the process I should be doing to automatically import servers into CCM? I can automate creating hosts/services by setting the target to the /services and /hosts directory using @@nagios_service and @@nagios_host, but that does not bring them into CCM. So I think that might be the wrong direction to be going?
Re: Importing servers into CCM
Posted: Mon Dec 11, 2023 5:15 pm
by bbahn
Hello dlally,
I am not familiar with puppet, but you can create new hosts/services/etc using the Nagios XI API. This makes automated creation/modification of hosts/services quite simple.
If you want to modify the core files directly, the tip in the
/usr/local/nagios/etc/hosts files can point you in the right direction:
Code: Select all
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
Otherwise, Nagios Core and Nagios XI track most things through the three databases
nagios,
nagiosql, and
nagiosxi.
Hope this helps!
Re: Importing servers into CCM
Posted: Mon Dec 11, 2023 5:59 pm
by kg2857
You can import valid config files by putting them in the import dir and running the reconfigure script.
Re: Importing servers into CCM
Posted: Tue Dec 12, 2023 3:56 pm
by dlally
I appreciate the replies so far. I do understand the import directory and the API's. I guess I'm more leaning towards seeing how other people are using it in conjunction with puppet to automate these tasks.
Re: Importing servers into CCM
Posted: Tue Dec 12, 2023 5:15 pm
by bbahn