Page 2 of 2

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

Posted: Mon Oct 28, 2013 10:50 am
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.

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

Posted: Mon Oct 28, 2013 11:13 am
by vAJ
I get nothing in the debug log

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

Posted: Mon Oct 28, 2013 12:53 pm
by vAJ
Correction: I get nothing from that check in the debug log. I get plenty of messages in the debug log.

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

Posted: Mon Oct 28, 2013 1:03 pm
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

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

Posted: Mon Oct 28, 2013 1:38 pm
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.

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

Posted: Mon Oct 28, 2013 2:23 pm
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

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

Posted: Mon Oct 28, 2013 3:20 pm
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

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

Posted: Tue Oct 29, 2013 9:50 am
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.

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

Posted: Tue Oct 29, 2013 10:24 am
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

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

Posted: Tue Oct 29, 2013 3:32 pm
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\;@