Consolidated Services using Wizards
Consolidated Services using Wizards
When adding new hosts into NagiosXI, is there a way the wizards could use the existing services instead of creating one new ones for each host?
Example:
Hosts: Server A, Server B
Service: SNMP
Server A -> SNMP
Server B -> SNMP
Instead of:
Hosts: Server A, Server B
Service: Server A (SNMP), Server B (SNMP)
Server A -> Server A (SNMP)
Server B -> Server B (SNMP)
Example:
Hosts: Server A, Server B
Service: SNMP
Server A -> SNMP
Server B -> SNMP
Instead of:
Hosts: Server A, Server B
Service: Server A (SNMP), Server B (SNMP)
Server A -> Server A (SNMP)
Server B -> Server B (SNMP)
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Consolidated Services using Wizards
In CCM, create services that are assigned to hostgroup(s) and not a host.
Then you can run a wizard, don't select any services to monitor but select the hostgroup it should belong to.
Now the host will get any services that those hostgroups are assigned to.
In these instances, skipping the wizard and just cloning an existing host in CCM is as powerful. Especially when you use templates which have the hostgroups defined in them.
Does this help?
I covered some of this in my presentation on Nagios XI Best Practices:
https://www.youtube.com/watch?v=6WlZrG-_sAI
Then you can run a wizard, don't select any services to monitor but select the hostgroup it should belong to.
Now the host will get any services that those hostgroups are assigned to.
In these instances, skipping the wizard and just cloning an existing host in CCM is as powerful. Especially when you use templates which have the hostgroups defined in them.
Does this help?
I covered some of this in my presentation on Nagios XI Best Practices:
https://www.youtube.com/watch?v=6WlZrG-_sAI
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Consolidated Services using Wizards
Thank you for the video, it has helpful information.
Your suggestion makes sense, but doesn't fit 100% with our vision. We are attempting to integrate our inventory system with NagiosXI, to be updated automatically once a day. The integration will add new equipment and hostgroups (As Needed) and move around already existing equipment in NagiosXI. My questions comes from the situation where new equipment get added and the hostgroup does not already exist, so the services would need to be identified and attached to the newly created hostgroup.
Could a wizard scan the host and assign already built services to the newly created host or hostgroup, instead of creating duplicate services?
Your suggestion makes sense, but doesn't fit 100% with our vision. We are attempting to integrate our inventory system with NagiosXI, to be updated automatically once a day. The integration will add new equipment and hostgroups (As Needed) and move around already existing equipment in NagiosXI. My questions comes from the situation where new equipment get added and the hostgroup does not already exist, so the services would need to be identified and attached to the newly created hostgroup.
Could a wizard scan the host and assign already built services to the newly created host or hostgroup, instead of creating duplicate services?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Consolidated Services using Wizards
Unfortunately not, the wizards are not that smart.chicjo01 wrote:ould a wizard scan the host and assign already built services to the newly created host or hostgroup, instead of creating duplicate services?
How are you planning on automating this? There are a couple of different ways in XI so I would like to know this first before I give advice.chicjo01 wrote:We are attempting to integrate our inventory system with NagiosXI, to be updated automatically once a day. The integration will add new equipment and hostgroups (As Needed) and move around already existing equipment in NagiosXI.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Consolidated Services using Wizards
Thank you for the information.
We plan to use the Nagios API to Pull/Push data in NagiosXI and compare it with the server. But, we recently encountered a problem which could force us to start over from scratch.
We can pull data from NagiosXI via the API just fine as well as push new hosts, hostgroups, and services. The problem is the lack of API calls to associate them together. Does the Nagios API have calls to link hosts, hostgroups, and services together?
API Calls:
config/host
??? - API Call to host_to_hostgroup
config/hostgroup
??? - API Call to service_to_hostgroup
config/service
We plan to use the Nagios API to Pull/Push data in NagiosXI and compare it with the server. But, we recently encountered a problem which could force us to start over from scratch.
We can pull data from NagiosXI via the API just fine as well as push new hosts, hostgroups, and services. The problem is the lack of API calls to associate them together. Does the Nagios API have calls to link hosts, hostgroups, and services together?
API Calls:
config/host
??? - API Call to host_to_hostgroup
config/hostgroup
??? - API Call to service_to_hostgroup
config/service
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Consolidated Services using Wizards
Because the API is new in XI 5, this ability does not exist yet. I've created a feature request, TASK ID 7193.chicjo01 wrote:The problem is the lack of API calls to associate them together. Does the Nagios API have calls to link hosts, hostgroups, and services together?
I did discover that you can re-add an existing hostgroup, however it will overwrite the existing members. Hence you need to get a list of members in the group first (hosts and hostgroups). I tried using the XGET however it does not return the members:
Code: Select all
curl -XGET "http://10.25.254.220/nagiosxi/api/v1/objects/hostgroup?apikey=en097kcs&pretty=1"
{
"hostgrouplist": {
"recordcount": "2",
"hostgroup": [
{
"@attributes": {
"id": "160"
},
"instance_id": "1",
"hostgroup_name": "test_group1",
"is_active": "1",
"config_type": "1",
"alias": "test_group1"
},
{
"@attributes": {
"id": "145"
},
"instance_id": "1",
"hostgroup_name": "linux-servers",
"is_active": "1",
"config_type": "1",
"alias": "Linux Servers"
}
]
}
}To get past this hurdle, you could use the nagios JSON API to perform a query.
Code: Select all
URL: http://10.25.254.220/nagios/cgi-bin/objectjson.cgi?query=hostgroup&hostgroup=test_group1
{
"format_version": 0,
"result": {
"query_time": 1449448707000,
"cgi": "objectjson.cgi",
"user": "nagiosadmin",
"query": "hostgroup",
"query_status": "released",
"program_start": 1449448698000,
"last_data_update": 1449448698000,
"type_code": 0,
"type_text": "Success",
"message": ""
},
"data": {
"hostgroup": {
"group_name": "test_group1",
"alias": "test_group1",
"members": [
"localhost",
"localhost2",
"localhost3"
],
"notes": "",
"notes_url": "",
"action_url": ""
}
}
}Here's some info on the JSON API:
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
Not sure how much of this is helpful.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Consolidated Services using Wizards
Thank you for the creating the Tasks for the API calls to be reviewed and hopefully created.
Re: Consolidated Services using Wizards
I'll leave this open for now. Please let us know if you come across anything else regarding this that may warrant a feature request. If not, please do not bump the post, as there is already a FR in and that's about as far as we can go on support. Thanks!
Former Nagios Employee.
me.
me.
Re: Consolidated Services using Wizards
How do I get a status on the below TASK ID, do you have a URL or a tracking system for features?
TASK ID 7193 and 7193
TASK ID 7193 and 7193
Re: Consolidated Services using Wizards
The tracking system is internal only. I looked at 7193, and 7194 - at this point they are still in the developers to-do pool.
Feel free to post back when you'd like to check for an update once again.
Feel free to post back when you'd like to check for an update once again.
Former Nagios Employee