Having issues duplicating a disk space check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Having issues duplicating a disk space check

Post by Box293 »

I'm very new to Nagios, I'm having trouble with some disk space checks.

I have a windows server that was added using the server wizard. It has existing disk checks for C: and D: and these are working fine.
Now I want to monitor another disk E: I've added to that server.

I use the core config manager
I click Services
I click the Copy icon for the D: check.
I modify the new duplicate service, I do the following:
  • Change the Config Name so it no longer has "(1)" in the name
    Change the Service description to Drive E: Disk Usage Check
    At this point it is worth noting that the $ARG1$ field is empty, there is nothing typed in here. When I look at the original service I took a copy of it also has an $ARG1$ field that is empty. I assume this is how the wizard has configured it.
    At this point it is worth noting that the $ARG2$ field has USEDDISKSPACE typed in it
    Change $ARG3$ field to -l E -w 80 -c 90
    I click the Save button
    I get the form check warning that "You have not filled in all command arguments for your selected command!
    I click OK
    I get the secure question that "You have not filled in some required fields"
    I click Yes
I then go and modify the new service
When I look at the fields, $ARG1$ is now populated with what used to be in $ARG$2, $ARG2$ is now populated with what used to be in $ARG$2 and $ARG$3 is empty.

So this is my problem. I have also tried creating a service from scratch without using the copy feature and also get the same problem. It does not seem to like $ARG1$ being an empty field even though this is how the configuration wizard creates it initially.

Looking for some help here, am I doing things the correct way?

I am using the XI virtual machine that has been imported to ESx 4.0 Update 1. I orginally downloaded 2009R1.1C, upgraded to 2009R1.1D. The symptoms above were from the 2009R1.1D.

I upgraded last night to 2009R1.1F and this problem is still occuring.

All my management has been using IE 7 or IE 8.

P.S. Nagios rocks
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: Having issues duplicating a disk space check

Post by admin »

This looks to be a overly-"helpful" feature of NagiosQL that actually breaks things if you want to leave $ARG1$ blank. We verified this is a problem and shifts $ARG2$ and $ARG3$ to $ARG1$ and $ARG2$, respectively, if $ARG1$ was originally blank.

We'll put this on our TODO list for a future update.

FYI, I would strongly recommend using a password with NSClient++. The password is what gets placed in $ARG1$ under normal circumstances.

You could also optionally create a copy of the check_xi_service_nsclient command definition and call it check_xi_service_nsclient_nopassword, or something similiar. The command line used in the definition could look like this:

Code: Select all

$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
If you do that, you could use this command when you duplicate the service to monitoring drive E:\. This is not an ideal solution, but it will work. We'll try and get NagiosQL modified to prevents its (un)helpful behavior that caused this problem.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
User avatar
egalstad
Posts: 76
Joined: Thu Oct 29, 2009 2:07 pm

Re: Having issues duplicating a disk space check

Post by egalstad »

Great news! We found the code in NagiosQL that causes this problem and just tested some code that fixes it. :-) We'll include this in the next release. Thanks for the report of this issue!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Having issues duplicating a disk space check

Post by Box293 »

Thanks both for confirming the problem, the future fix and possible work arounds.

I understand the security implications for the password so I am keen to do things the "proper way".

With that in mind, I'm getting my head around Nagios and NSClient++ so I might ask some questions that may already be obvious to others.

Is there a way of defining a global variable for the NSClient++ password? This way I could specify in the $ARG1$ box the password as a variable (like $NSCPASS1$). Or something along these lines. My arguments for this are:
  • I don't have to type the password a million times
    I can change the password in one location on the nagios server and know it is changed across the board obiously I need to update the NSC.ini file on all the servers being monitored.
    Perhaps I don't want other Nagios users knowing the password but they can still use a pre-defined variable
    $NSCPASS1$, $NSCPASS2$, $NSCPASS3$ etc etc allows different passwords to be pre-defined for different uses. These might have a more generic name like $PASS1$.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Having issues duplicating a disk space check

Post by Box293 »

admin wrote:This looks to be a overly-"helpful" feature of NagiosQL that actually breaks things if you want to leave $ARG1$ blank. We verified this is a problem and shifts $ARG2$ and $ARG3$ to $ARG1$ and $ARG2$, respectively, if $ARG1$ was originally blank.
Thanks for fixing this in Nagios XI 2009R1.1G. I have palyed with it a bit and it is all working OK.

I have been thinking more about how to use templates to save data re-entry and to apply standards across the board. I would like the ability to use a template but be able to specify on the service using the template to use just one $ARG$ field to ajdust the checks when they don't match the standards in place.

For example the service template xiwizard_windowsserver_ping_service.
This has $ARG1$ - $ARG4$ populated.
This is being used by my Windows Server for it's Ping check.
However for this server I would like to have the warning percentage set 40% instead of the default 80% value specified in the template xiwizard_windowsserver_ping_service
So I have tried typing 40% into the $ARG2$ field for the ping service (not the template) however after clicking save and editing the service again the $ARG2$ field is empty, my edits were dropped.
I then selected in the service (not the template) the Check command check_xi_service_ping (which is what the template uses). However when doing this it appears that any values in the $ARG$ fields in the template are now ignored.

So my request is to be able to use a template in a service but still be able to put values into the $ARG$ fields on the service itself (not the template) so that they combine together to give me a customised check.

Does this make sense?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked