Service description, host name, or check command is NULL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Service description, host name, or check command is NULL

Post by snapon_admin »

Is there some kind of limit for how many services can be cloned using the bulk host cloning wizard or something? Every single time I try to clone this particular host I receive this error. All of my service definitions end up blank (see below example), and I have no idea how to get around this.

Code: Select all

define service {
        host_name                       lisaerp06p on lisapps26g
        service_description             / Disk Usage
        register                        1
        }

define service {
        host_name                       lisaerp06p on lisapps26g
        service_description             /opt/splunk Disk Usage
        register                        1
        }

define service {
        host_name                       lisaerp06p on lisapps26g
        service_description             /vendor/batchjobs Disk Usage
        register                        1
        }

define service {
        host_name                       lisaerp06p on lisapps26g
        service_description             /vendor/cognos Disk Usage
        register                        1
        }

This host has 123 service checks that I'm trying to add. The host I'm cloning it off of currently has the same 123 checks. This is a server that will be replacing the one I am cloning it off of, hence the use of the bulk host cloning wizard. Made the most sense at the time, but now I can't get it to work...
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service description, host name, or check command is NULL

Post by lmiltchev »

Make sure that your “template” (the host you are trying to clone) has the same config name for host and services. If you renamed host/services they may be different. In this case the wizard will fail with the "Error: Service description, host name, or check command is NULL. Error: Could not register service..." error message.

See the troubleshooting section in the following document:

http://assets.nagios.com/downloads/nagi ... Wizard.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Service description, host name, or check command is NULL

Post by snapon_admin »

Ah, that looks to be the problem. It looks lik the service name is the one I nee to change. If I change the name of the .cfg file manually and then apply config from the gui will that bork anything?
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Service description, host name, or check command is NULL

Post by snapon_admin »

Never mind, it looks like manually renaming the cfg file and removing it doesn't actually work. As soon as I apply a new config the old file name is restored. So my next question, is there an easy way to rename all 123 services without having to click on each one individually and change them?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service description, host name, or check command is NULL

Post by lmiltchev »

You can use the Bulk Renaming Tool which comes with the Nagios XI Enterprise Edition. If you don't have Enterprise, you can start a free, 60-day, fully functional trial and get the job done. :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Service description, host name, or check command is NULL

Post by snapon_admin »

In this case the bulk renaming tool wouldn't help me, though. The host cfg file was named correctly, the service cfg file was not. Unfortunately the bulk service renaming wizard only allows me to change the name of the service description, which doesn't need to be changed in this case. Visual example would be that the host cfg name was 'potato salad.cfg' and the service name was 'tater salad.cfg'. I needed tater salad to be named potato salad. Looks like the only way to change the actual config name for the services is to actually do it individually on every single service check. Once I changed the config name on all 123 services and applied that config it changed the service cfg file name and all was well. Sort of a pain to do, but not anything to lose sleep over.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service description, host name, or check command is NULL

Post by lmiltchev »

I see. Bulk renaming configs could be a good feature request candidate. I just want to point out that if you create your hosts/service via our wizards, the host/services configs WILL be named the same, and the issue wouldn't exist.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Service description, host name, or check command is NULL

Post by snapon_admin »

I did use the wizards when initially adding the host/services. Problem was this host is a zone on one of our Unix servers. Our naming scheme (to make things easier for management to read) is <Zone> on <Global server>. This particular zone was failed over from one global to another. When this happens I need to change the name of the host so that management still sees the correct global that the zone is one, but if I don't change the config names on the services they still work fine as long as the parent host to the services is the correct host. TL;DR: this was only an issue because when this zone was failed over to a different global I was too lazy to change the names of all 120+ service checks. :P

If you wanna throw in a feature request for bulk config renaming I would definitely like something like that in XI. I'm not sure how much other demand there'd be for something like this but it'd certainly be helpful for us. Zones don't fail over to different globals often, but it does happen and a bulk config renaming tool would make things easier on me for sure.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Service description, host name, or check command is NULL

Post by slansing »

Writing up a feature request right now! :)
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Service description, host name, or check command is NULL

Post by snapon_admin »

Perfect, thanks much! You can go ahead and lock this up.
Locked