check_vnc Service check did not exit properly

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
treii28
Posts: 2
Joined: Thu Oct 26, 2017 12:46 pm

check_vnc Service check did not exit properly

Post by treii28 »

I'm trying to set up a custom service check via a server group definition with a new install (as a newbie) on nagios. I found a script on the nagios website for check_vnc and installed it in my /usr/lib/nagios/plugins (manually)

I then created a new vnc.cfg under /etc/nagios-plugins/config/vnc.cfg:

Code: Select all

# cat /etc/nagios-plugins/config/vnc.cfg 
# 'check_vnc' command definition
define command{
        command_name    check_vnc
        command_line    /usr/lib/nagios/plugins/check_vnc -H '$HOSTADDRESS$'
        }

# 'check_vnc_port' command definition
define command{
        command_name    check_vnc_port
        command_line    /usr/lib/nagios/plugins/check_vnc -p '$ARG1$' -H '$HOSTADDRESS$'
        }
I added the following hostgroup definition to my /etc/nagios3/conf.d/hostgroups_nagios2.cfg file:

Code: Select all

define hostgroup {
        hostgroup_name  vnc-servers
        alias           VNC servers
        members         localhost
        }
then added the service definition to /etc/nagios3/conf.d/services_nagios2.cfg:

Code: Select all

define service {
        hostgroup_name          vnc-servers
        service_description     VNC
        check_command           check_vnc
        use                     generic-service
        notification_interval           0 ; set > 0 if you want to be renotified
        }
The host itself is defined in /etc/nagios3/conf.d/localhost_nagios2.cfg:

Code: Select all

define host{
        use                     generic-host            ; Name of host template to use
        host_name               localhost
        alias                   localhost
        address                 127.0.0.1
        }
When I restart the server, it reports a critical error for:
VNC CRITICAL 2017-10-26 13:50:28 0d 0h 27m 21s 4/4 (Service check did not exit properly)

When I execute it from the command line, it seems to behave just fine:

Code: Select all

# /usr/lib/nagios/plugins/check_vnc -H localhost
VNC OK - RFB version 003.008 | time=0.069626s;;
# sudo -u www-data /usr/lib/nagios/plugins/check_vnc -H 127.0.0.1
VNC OK - RFB version 003.008 | time=0.065526s;;
# echo $?
0
treii28
Posts: 2
Joined: Thu Oct 26, 2017 12:46 pm

Re: check_vnc Service check did not exit properly

Post by treii28 »

OK, I eventually figured out that apparently that check_vnc plugin isn't compliant. (changing from using the embedded perl interpreter to the global one seems to have made that one work)

But now I'm getting the 0 bytes received errors for anything checked via check_nrpe and none of my check_nrpe!check_* items are trying to pass any variables/arguments. (I've tried it with the dont_blame_nrpe at both 0 and 1 with the same result)
kyang

Re: check_vnc Service check did not exit properly

Post by kyang »

If this is an NRPE related issue, I would ask you to create a new thread about NRPE. That way we aren't mixing two topics into one. I can move it into a new topic when I see a response.

Did nrpe work prior to your issue on check_vnc?
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: check_vnc Service check did not exit properly

Post by tacolover101 »

kyang wrote:If this is an NRPE related issue, I would ask you to create a new thread about NRPE. That way we aren't mixing two topics into one. I can move it into a new topic when I see a response.

Did nrpe work prior to your issue on check_vnc?
\when opening the NRPE thread, post logs from the client side, as well as the command you're using on the Nagios side, and how you have check_nrpe configured.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check_vnc Service check did not exit properly

Post by npolovenko »

@treii28, And you can include the link to this thread if you think these issues are related.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked