Importing servers into CCM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
dlally
Posts: 5
Joined: Mon Dec 11, 2023 12:17 pm

Importing servers into CCM

Post 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?
bbahn
Posts: 137
Joined: Thu Jan 12, 2023 5:42 pm

Re: Importing servers into CCM

Post 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!
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
kg2857
Posts: 254
Joined: Wed Apr 12, 2023 5:48 pm

Re: Importing servers into CCM

Post by kg2857 »

You can import valid config files by putting them in the import dir and running the reconfigure script.
dlally
Posts: 5
Joined: Mon Dec 11, 2023 12:17 pm

Re: Importing servers into CCM

Post 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.
bbahn
Posts: 137
Joined: Thu Jan 12, 2023 5:42 pm

Re: Importing servers into CCM

Post by bbahn »

It looks like some people have found success here:
Nagios XI + Puppet?

Automated Monitoring with Nagios and Puppet

And here are some Nagios references that might come in handy:
Automated Host Management in Nagios XI 5.x
Automated Host Managemet in Nagios XI 2024
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Post Reply