How does the service copy command work ?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

How does the service copy command work ?

Post by vijilants »

System:

Nagios XI Version : 5.2.3
CentOS release 6.5 (Final)

Hi,

Can you please advise on the following.

I have a router on the Nagios system and we are adding ports which are the same type as the existing ports. So, rather than having to rescan the entire router, my idea was to do the following:

In the Services menu in CCM, find the router services, click on a similar service on that router, use the copy button, then go back and edit the text field and the ifindex on the copy.

However when I go to do this, after using the copy button, I don't see a copy of the service in the list of services for that router.

Can someone please advise ?
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: How does the service copy command work ?

Post by bwallace »

Here is our recommended method for adding services to an existing switch / router, this should work for you:
https://support.nagios.com/kb/article.p ... ategory=51
Be sure to check out the Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How does the service copy command work ?

Post by vijilants »

bwallace wrote:Here is our recommended method for adding services to an existing switch / router, this should work for you:
https://support.nagios.com/kb/article.p ... ategory=51
Hi,

You have pointed me at an artice which is out of date and has this in big red bold letters on the top of it...

"NOTE: As of XI 2014 these steps are no longer necessary to add new services to an existing
switch or router, as MRTG now stores configurations in per-device .cfg files. The XI Switch /
Router Wizard handles all of the logic for you."
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: How does the service copy command work ?

Post by gormank »

Try going to CCM, services and search for copy.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How does the service copy command work ?

Post by tmcdonald »

Might not have been obvious but the document is in fact accurate. You will need to take the route of re-scanning via the wizard due to some of the backend components that the wizard configures, which would not happen if you just copied in the CCM.
Former Nagios employee
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How does the service copy command work ?

Post by vijilants »

tmcdonald wrote:Might not have been obvious but the document is in fact accurate. You will need to take the route of re-scanning via the wizard due to some of the backend components that the wizard configures, which would not happen if you just copied in the CCM.
OK....This is what I did....I copied an existing service, changed the ifindex and the description field, and applied the configuration and that appeared to work.

So what would I be missing in comparison to using the wizard ?

The issue with the wizard is that if you rescan a switch for instance with multiple ports, you have to go through just about every port and readjust the bandwidth trigger parameters and that is a very tedious process on large switches.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How does the service copy command work ?

Post by tgriep »

When the Network Switch / Router is run, it creates a MRTG config file in this folder

Code: Select all

/etc/mrtg/conf.d
That config file is used to create the RRD files that hold the bandwidth information that the check_rrdtraf command uses to generate the bandwidth information.

Problem is that just copying the service in the Core Config Manager doesn't add that configuration to the MRTG files.
If you manually want to copy over a bandwidth check in the CCM, you will also have to edit the config file in the /etc/mrtg/conf.d folder and add that interface so the MRTG process can generate the RRD files.
Does that explanation help out?
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How does the service copy command work ?

Post by vijilants »

So what is the point of the copy functionality if it does not do the complete job ?

Thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How does the service copy command work ?

Post by rkennedy »

The copy part of the core config manager does not know that you are copying a RRD file, it simply knows that you're copying a service. Since the check is relying on a RRD file, I can understand where your question comes from.
Former Nagios Employee
Locked