Test check works in CCM, but fails once applied

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Test check works in CCM, but fails once applied

Post by abrist »

vAJ wrote:Do I need to crank up debug level somewhere for it to show what you're asking for?
Yep, my apologies. Edit: /usr/local/nagios/etc/nagios.cfg.
Change:

Code: Select all

debug_level=1
debug_verbosity=1
To:

Code: Select all

debug_level=16
debug_verbosity=2
Restart nagios:

Code: Select all

service nagios restart
Now look through the debug log:

Code: Select all

grep -10 "DFS Content Share" /usr/local/nagios/var/nagios.debug
WARNING!: Make sure to return the debug config options to their default values afterwards (and restart nagios) or else you run the risks of filling your disks with the extremely verbose output of nagios.debug.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Test check works in CCM, but fails once applied

Post by vAJ »

I get nothing in the debug log
Andrew J. - Do you even grok?
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Test check works in CCM, but fails once applied

Post by vAJ »

Correction: I get nothing from that check in the debug log. I get plenty of messages in the debug log.
Andrew J. - Do you even grok?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Test check works in CCM, but fails once applied

Post by abrist »

Has the check run since you changed the debug options? Maybe search for just "DFS"? If the check is running, it should end up in the debug log:

Code: Select all

grep -10 "DFS" /usr/local/nagios/var/nagios.debug
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Test check works in CCM, but fails once applied

Post by vAJ »

I don't know why, but grepping for "DFS" returns a lot of lines that don't have "DFS" anywhere in them...

Yes, I've manually forced this check and immediate attempted to grep the check attempt.
Andrew J. - Do you even grok?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Test check works in CCM, but fails once applied

Post by abrist »

That is because I had you pass -10 to the grep for context. Try without it:

Code: Select all

grep "DFS" /usr/local/nagios/var/nagios.debug
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Test check works in CCM, but fails once applied

Post by vAJ »

ok. Had to grep on the server name. Don't know why it didn't like "DFS"...

Code: Select all

[1382991479.236744] [016.2] [pid=12042] Processed service performance data file output: DATATYPE::SERVICEPERFDATA    TIMET::1382991479        HOSTNAME::AUS05NPTPDFSR01.prod.****.com SERVICEDESC::DFS Content Share  SERVICEPERFDATA::    SERVICECHECKCOMMAND::check_smb_share!content!prod\svc_*****!YmYU%gFv3zXj\   HOSTSTATE::UP   HOSTSTATETYPE::HARD  SERVICESTATE::CRITICAL   SERVICESTATETYPE::HARD  SERVICEOUTPUT::CRITICAL SMB Sharename: content WARNING: The idmap uid option is deprecated
Andrew J. - Do you even grok?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Test check works in CCM, but fails once applied

Post by slansing »

Lets eliminate one more thing here, can you run this command manually from the command line? You can leave the illegal characters in for the password instead of using that macro. The check 'should' return fine.
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Test check works in CCM, but fails once applied

Post by vAJ »

Yep, command line works great:

Code: Select all

[andrew@nagiosapp libexec]$  ./check_smb_share -H aus05nptpdfsr01.prod.****.com -s content -u "prod\svc_****" -p "YmYU%gFv3zXj;@"
OK SMB Sharename:       content         Disk      Content Share
Perms on script:

Code: Select all

-rwxr-xr-x  1 nagios nagios   1584 Oct 24 11:11 check_smb_share
Andrew J. - Do you even grok?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Test check works in CCM, but fails once applied

Post by abrist »

vAJ wrote:check_smb_share!content!prod\svc_*****!YmYU%gFv3zXj\
It looks like the semicolon is still causing issues. Try escaping it in resource.cfg:

Code: Select all

$USER9$=YmYU%gFv3zXj\;@
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked