Service Naming Convention

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Service Naming Convention

Post by krutaw »

I was just curious what advice you could give regarding a Service Naming Convention. I've been putting some thought into my Nagios implementation and plan to rebuild from the ground up but before doing so I want to build some clear rules and standards. I'm interested to find out what naming convention others use for their checks in Nagios.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Service Naming Convention

Post by tmcdonald »

I might be biased as I started out using XI, but I like how the wizards in XI ultimately save out the configs by naming the service .cfg file after the hostname, and then having all the services in that one file. This makes it pretty easy to identify what service goes to what host. Yes, this means you lose a bit of flexibility when you need to add one service to many hosts, but at that point you can just script it out and create the configs as I described. It also makes decommissioning easier, as you just delete the service and host configs and call it a day, instead of editing a file and removing the hostname.
Former Nagios employee
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Service Naming Convention

Post by krutaw »

tmcdonald wrote:I might be biased as I started out using XI, but I like how the wizards in XI ultimately save out the configs by naming the service .cfg file after the hostname, and then having all the services in that one file. This makes it pretty easy to identify what service goes to what host. Yes, this means you lose a bit of flexibility when you need to add one service to many hosts, but at that point you can just script it out and create the configs as I described. It also makes decommissioning easier, as you just delete the service and host configs and call it a day, instead of editing a file and removing the hostname.
I'm so sorry, I should have been more specific. I'm actually referring to the service names within Nagios XI itself. So let's say you're performing CPU,disk, memory, web response, etc. What kind of naming conventions for the services within Nagios itself (not the configuration file, but the actual service object) do you recommend?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Service Naming Convention

Post by tmcdonald »

I'm going to move this out of the Nagios Core section of the forum since it is a Nagios XI question.

In that case my answer still stands, I set the Config Name of each service to whatever hostname it will be attached to, and I set the Service Description to match whatever I am monitoring on that host. This is pretty standard behavior for how the wizards work.
Former Nagios employee
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Service Naming Convention

Post by krutaw »

tmcdonald wrote:I'm going to move this out of the Nagios Core section of the forum since it is a Nagios XI question.

In that case my answer still stands, I set the Config Name of each service to whatever hostname it will be attached to, and I set the Service Description to match whatever I am monitoring on that host. This is pretty standard behavior for how the wizards work.
Fair enough to move it out into NagiosXI. But are you saying that the best naming convention that you're aware of is what is used in the wizards? I ask because the wizards give services fairly lack-luster names. Some of them don't even allow for performance graphing (windows wizard using a colon in the name as an example.)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Service Naming Convention

Post by tmcdonald »

The names the wizards give are related to the service, so if you are using check_http it makes a lot of sense to call your service description "HTTP". However if you want to call it "HTTP - somehostname" then you are more than welcome to do so since you are creating the service yourself.

And I wouldn't say it is the best, it is just the one that I have grown used to and is the one that you will see in a lot of XI installs since wizards are used fairly heavily.

As far as performance graphing, the name of the service really should have no impact on that since it all has to do with the plugin that is used.
Former Nagios employee
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Service Naming Convention

Post by krutaw »

tmcdonald wrote:The names the wizards give are related to the service, so if you are using check_http it makes a lot of sense to call your service description "HTTP". However if you want to call it "HTTP - somehostname" then you are more than welcome to do so since you are creating the service yourself.

And I wouldn't say it is the best, it is just the one that I have grown used to and is the one that you will see in a lot of XI installs since wizards are used fairly heavily.

As far as performance graphing, the name of the service really should have no impact on that since it all has to do with the plugin that is used.
Actually, it has EVERYTHING to do with whether or not XI will be able to display the graphs created. If there's a special character like a colon in the name, it simply won't see the file and thus will think there is no performance graphing data to be viewed.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Service Naming Convention

Post by lmiltchev »

Are you trying to rename a service under the CCM and losing performance graphs? If this is the case, try renaming it via the CCM->Tools->Renaming Tool instead.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Service Naming Convention

Post by tmcdonald »

Have you seen this behavior in the past? I have a service right now that is named "CPU-Interface-:-1 Bandwidth" and the perfdata graphs just fine. Granted there is not a lot in there since it's a CPU port, but it works. What matters is not the service description, it's the RRD file name that is passed as an argument to the plugin. In this case it is checking a MRTG-generated RRD file and the colon in the description does not affect this.

Update: And in reference specifically to the RRD that stores the perfdata, I believe we strip out any illegal characters both when initially creating and when later reading from the RRD, so the only way this would be an issue is possibly if you have two services, one named "HOST!" and one named "HOST:" which, after stripping, would both be "HOST".
perfdata.png
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Service Naming Convention

Post by krutaw »

lmiltchev wrote:Are you trying to rename a service under the CCM and losing performance graphs? If this is the case, try renaming it via the CCM->Tools->Renaming Tool instead.
Not even close. The original post was about planning out a naming convention which then morphed into troubleshooting something that I have no intentions on fixing.
Locked