Hi,
I'm using something the Bulk Host Cloning and Import to create multiple Hosts in Nagios XI, and I wondering if something similar exist for Services?
I have to create a lot of services and would use something similar.
If not, is there a command line that I can use to create a service? I could at that moment use a script to create all my services I need to add.
Create service by command line
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Create service by command line
Hi @steph007,
There are couple of options here. One approach is to create a service and then assigned this service to a hostgroup in the CMM. All of the hosts in the hostgroup will inherit the service.
We have a Pro Tip video on how to do this that I would recommend watching.
https://youtu.be/Qj_HALNyWvc
You can also use the REST API to add a service to a host. The API is fully documented in the user interface, got to Help > API Docs. Then find the Config Reference in the left-hand sidebar, and got to POST > config/service.
Let us know if you have more questions.
There are couple of options here. One approach is to create a service and then assigned this service to a hostgroup in the CMM. All of the hosts in the hostgroup will inherit the service.
We have a Pro Tip video on how to do this that I would recommend watching.
https://youtu.be/Qj_HALNyWvc
You can also use the REST API to add a service to a host. The API is fully documented in the user interface, got to Help > API Docs. Then find the Config Reference in the left-hand sidebar, and got to POST > config/service.
Let us know if you have more questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Create service by command line
Thanks, I chose to create file and import it in Nagios
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Create service by command line
Great!steph007 wrote:Thanks, I chose to create file and import it in Nagios
Locking thread