eait-itig/rdpprobe

null output

Opened this issue · 1 comments

Hi,

I'd really like to use this plugin but I can't get it to work in Nagios. I am using On my Ubuntu 16.04.05 system running Nagios 3.5.1 everything seems to work from the command line:

# sudo -u nagios /usr/lib/nagios/plugins/check_rdp testserver1.local
OK: connected tlsv1.2, valid certificate, using {ecdhe_rsa,aes_256_gcm,null,
                                                 sha384}

However, when executed by Nagios the plugin returns exit code 1 and no output. This is my config:

# cat /etc/nagios3/conf.d/testserver1.cfg 
define host {
	use			generic-host
	host_name		testserver1
	alias			Test server VM #1
	address			testserver1.local
}

define service {
	use			generic-service
	host_name		testserver1
	service_description	Remote Desktop
	check_command		check_rdp!5000
}

define command {
	command_name	check_rdp
	command_line	/usr/lib/nagios/plugins/check_rdp -t $ARG1$ $HOSTADDRESS$
}

According to my nagios.debug logfile, this is the actual command that is executed:

Done. Final output: '/usr/lib/nagios/plugins/check_rdp -t 5000 testserver1.local'

And when I watch the proces list continously, this is what's happening:

nagios   28130 28129  0 08:17 ?        00:00:00 sh -c /usr/lib/nagios/plugins/check_rdp -t 5000 testserver1.local
nagios   28131 28130  0 08:17 ?        00:00:00 /bin/sh /usr/bin/erl +B -boot start_clean -noshell -smp disable -run escript start -extra /usr/lib/nagios/plugins/check_rdp -t 5000 testserver1.local

But somehow the script does not return any output (or the right Nagios exit code).

Do you have any idea what I'm doing wrong? Thank you so much in advance!

We've been running this from icinga 1.12 on openbsd against various windows hosts for years without any trouble, but there are some significant differences to your environment.

I don't have any specific ideas about what might be wrong. I'd suggest stracing nagios to see what it's doing. tcpdump might help to see if it's getting far enough to do any network activity.