No output returned from plugin
No output returned from plugin
Hello,
We are trying to monitor DB connection time and Log file usage using check_mssql_server.php plugin. The plugin has all the required permissions.
Also, Nagios user is created at DB end with required permissions.
Still, we are getting "No output returned from plugin" error. Below is the server definition for your reference:
--checktype 'database' -U 'nagios' -P '********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
Getting below error when checked from command line:
[root@HO1-NAGIOSXI libexec]# /check_mssql_server.php -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P '**********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
-bash: /check_mssql_server.php: No such file or directory
[root@HO1-NAGIOSXI libexec]#
Please help us on the same.
Thanks in advance!!
We are trying to monitor DB connection time and Log file usage using check_mssql_server.php plugin. The plugin has all the required permissions.
Also, Nagios user is created at DB end with required permissions.
Still, we are getting "No output returned from plugin" error. Below is the server definition for your reference:
--checktype 'database' -U 'nagios' -P '********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
Getting below error when checked from command line:
[root@HO1-NAGIOSXI libexec]# /check_mssql_server.php -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P '**********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
-bash: /check_mssql_server.php: No such file or directory
[root@HO1-NAGIOSXI libexec]#
Please help us on the same.
Thanks in advance!!
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: No output returned from plugin
It looks like you have a space between / and check_mssql_server.php. I presume that's supposed to be ./check_mssql_server.php...RIDS_I2MP wrote:[root@HO1-NAGIOSXI libexec]# /check_mssql_server.php -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P '**********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
-bash: /check_mssql_server.php: No such file or directory
[root@HO1-NAGIOSXI libexec]#
Remove that space, and try it at the command line again. Also try this,
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_mssql_server.php -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P '**********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60Try that, and let us know what the result is. If it works, we can move on to troubleshooting the command within Nagios XI.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: No output returned from plugin
Hello,
We got the below reply:
[nagios@HO1-NAGIOSXI libexec]$ /usr/local/nagios/libexec/check_mssql_server.php -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P '********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
UNKNOWN: PDO MSSQL/DBLIB support is not installed on this server. Try adding packages php-pdo and php-mssql on rpm systems or php-sybase on deb systems.
check_mssql_database 0.1.0 - Copyright 2020 Nagios Enterprises, LLC.
Portions Copyright others (see source code).
Usage: /usr/local/nagios/libexec/check_mssql_server.php <options>
usage = "usage: %prog --checktype type -H hostname -U username -P password --mode testname
-w warning -c critical [-i instancename] [--perftype type] [--custom 'args']
[-v | -vv | -vvv | --verbose --complex]"
Options:
-h, --help Print detailed help screen.
-V, --version Print version information.
-v, --verbose Optional: Increases verbosity. Verbosity may be increased up to 3 times,
using -v, e.g., -vvv
--complex Optional: Show Traditional/Complex log entries, for use with verbose.
--perftype Optional: Specify which version of SQL Server you are using.
Option Table used
========== ========================================
deprecated sys.sysperfinfo SQL Server 2000+ - deprecated
default sys.dm_os_performance_counters SQL Server 2008+
azure sys.dm_pdw_nodes_os_performance_counters Azure Synapse Analytics (SQL DW)
parallel sys.dm_pdw_nodes_os_performance_counters Parallel Data Warehouse
--checktype Required: Specify 'database' or 'server' checks.
-H, --hostname Required: Hostname of the MSSQL server.
-U, --username Required: Username to use when logging into the MSSQL server.
-P, --password Required: Password to use when logging into the MSSQL server.
--mode Required: Must specify one and only one test, from the list, below...
(-h or --help for more information)
Available Tests
activetrans
datasize
logbytesflushed
logcachehit
logfilessize
logfilesused
logfileusage
logflushes
logflushwaits
loggrowths
logshrinks
logtruncs
logwait
transpsec
custom
time2connect
test
runall
-I, --instance Optional: MSSQL Instance. (Overrides port)
-p, --port Optional: MSSQL server port. (Default is 1433)
-i, --instancename Optional: specify the instance_name value, from the perf table.
(When run in --checktype 'database', default is 'master')
--custom 'args' Optional: Make sure you use double quotes (") in the brackets.
Requires --mode "custom".
Examples...
'{"counter_name":"Page life expectancy","instance_name":"000",
"unit":"s","modifier":"","ring_buffer_type":"","xpath":""}'
'("counter_name":"System Idle","instance_name":"","unit":"",
"modifier":"","ring_buffer_type":"RING_BUFFER_SCHEDULER_MONITOR",
"xpath":"/Record/SchedulerMonitorEvent/SystemHealth/SystemIdle[1]")'
-w, --warning=<WARNING> Required: The warning values, see:
-c, --critical=<CRITICAL> Required: The critical values, see
Note: Warning and critical threshold values should be formatted via the
Nagios Plugin guidelines. See guidelines here:
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Examples: 10 Alerts if value is > 10
30: Alerts if value < 30
~:30 Alerts if value > 30
30:100 Alerts if 30 > value > 100
@10:200 Alerts if 30 >= value <= 100
@10 Alerts if value = 10
This plugin checks the status of an MS SQL Server Database.
[nagios@HO1-NAGIOSXI libexec]$
We got the below reply:
[nagios@HO1-NAGIOSXI libexec]$ /usr/local/nagios/libexec/check_mssql_server.php -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P '********' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
UNKNOWN: PDO MSSQL/DBLIB support is not installed on this server. Try adding packages php-pdo and php-mssql on rpm systems or php-sybase on deb systems.
check_mssql_database 0.1.0 - Copyright 2020 Nagios Enterprises, LLC.
Portions Copyright others (see source code).
Usage: /usr/local/nagios/libexec/check_mssql_server.php <options>
usage = "usage: %prog --checktype type -H hostname -U username -P password --mode testname
-w warning -c critical [-i instancename] [--perftype type] [--custom 'args']
[-v | -vv | -vvv | --verbose --complex]"
Options:
-h, --help Print detailed help screen.
-V, --version Print version information.
-v, --verbose Optional: Increases verbosity. Verbosity may be increased up to 3 times,
using -v, e.g., -vvv
--complex Optional: Show Traditional/Complex log entries, for use with verbose.
--perftype Optional: Specify which version of SQL Server you are using.
Option Table used
========== ========================================
deprecated sys.sysperfinfo SQL Server 2000+ - deprecated
default sys.dm_os_performance_counters SQL Server 2008+
azure sys.dm_pdw_nodes_os_performance_counters Azure Synapse Analytics (SQL DW)
parallel sys.dm_pdw_nodes_os_performance_counters Parallel Data Warehouse
--checktype Required: Specify 'database' or 'server' checks.
-H, --hostname Required: Hostname of the MSSQL server.
-U, --username Required: Username to use when logging into the MSSQL server.
-P, --password Required: Password to use when logging into the MSSQL server.
--mode Required: Must specify one and only one test, from the list, below...
(-h or --help for more information)
Available Tests
activetrans
datasize
logbytesflushed
logcachehit
logfilessize
logfilesused
logfileusage
logflushes
logflushwaits
loggrowths
logshrinks
logtruncs
logwait
transpsec
custom
time2connect
test
runall
-I, --instance Optional: MSSQL Instance. (Overrides port)
-p, --port Optional: MSSQL server port. (Default is 1433)
-i, --instancename Optional: specify the instance_name value, from the perf table.
(When run in --checktype 'database', default is 'master')
--custom 'args' Optional: Make sure you use double quotes (") in the brackets.
Requires --mode "custom".
Examples...
'{"counter_name":"Page life expectancy","instance_name":"000",
"unit":"s","modifier":"","ring_buffer_type":"","xpath":""}'
'("counter_name":"System Idle","instance_name":"","unit":"",
"modifier":"","ring_buffer_type":"RING_BUFFER_SCHEDULER_MONITOR",
"xpath":"/Record/SchedulerMonitorEvent/SystemHealth/SystemIdle[1]")'
-w, --warning=<WARNING> Required: The warning values, see:
-c, --critical=<CRITICAL> Required: The critical values, see
Note: Warning and critical threshold values should be formatted via the
Nagios Plugin guidelines. See guidelines here:
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Examples: 10 Alerts if value is > 10
30: Alerts if value < 30
~:30 Alerts if value > 30
30:100 Alerts if 30 > value > 100
@10:200 Alerts if 30 >= value <= 100
@10 Alerts if value = 10
This plugin checks the status of an MS SQL Server Database.
[nagios@HO1-NAGIOSXI libexec]$
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: No output returned from plugin
What is the output of this command?UNKNOWN: PDO MSSQL/DBLIB support is not installed on this server
Code: Select all
rpm -qa | grep phpCode: Select all
/usr/local/nagios/libexec/check_mssql_database.py
/usr/local/nagios/libexec/check_mssql_server.pyYou do not have the required permissions to view the files attached to this post.
Re: No output returned from plugin
Hello,
Thanks for your help!!
We are getting below error now:
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P 'Nagi0s123' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
Tried below way as well:
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H ho1-dcapp.chalhoub.org -U 'nagios' -P 'Nagi0s123' --bufferhitratio -w 95: -c 90:
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
[root@HO1-NAGIOSXI libexec]#
Could you please help us on it.
Thanks for your help!!
We are getting below error now:
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H ho1-dcapp.chalhoub.org --checktype 'database' -U 'nagios' -P 'Nagi0s123' --instancename 'HO1-DCAPP' --perftype default -I 'HO1-DCAPP' -p 1433 --mode time2connect --warning 30 --critical 60
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
Tried below way as well:
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H ho1-dcapp.chalhoub.org -U 'nagios' -P 'Nagi0s123' --bufferhitratio -w 95: -c 90:
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
[root@HO1-NAGIOSXI libexec]#
Could you please help us on it.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: No output returned from plugin
Did you replace the files or copy/paste into them? It almost looks like a copy/paste error (python cares about the formatting).
What is the output of this command?
What is the output of this command?
Code: Select all
python -VRe: No output returned from plugin
Hello,
Below is the output:
[root@HO1-NAGIOSXI ~]# python -V
Python 3.6.8
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]# cd /usr/local/nagios/lib
-bash: cd: /usr/local/nagios/lib: No such file or directory
[root@HO1-NAGIOSXI ~]# cd /usr/local/nagios/lib*
[root@HO1-NAGIOSXI libexec]# ls -lrt *mssql*
-rwxrwxr-x. 1 apache nagios 24835 Jun 14 13:43 check_mssql
-rwxrwxr-x. 1 apache nagios 131817 Jun 14 13:43 check_mssql_server.php
-rwxr-xr-x. 1 apache nagios 14831 Jul 28 08:09 check_mssql_database.py
-rwxr-xr-x. 1 apache nagios 21830 Jul 28 08:09 check_mssql_server.py
[root@HO1-NAGIOSXI libexec]#
[root@HO1-NAGIOSXI libexec]#
I have the above plugins in Nagios.
I changed the first command and replaced the plgin name.
Please provide proper command as well for the plugins you have provided.
I also tried all below options:
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H 10.1.0.100 -U nagios -P Nagi0s123 --deadlocks -w 1 -c 2
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
[root@HO1-NAGIOSXI libexec]# /usr/local/nagios/libexec/check_mssql_database.py -H ho1-dcapp.chalhoub.org -U 'nagios' -P 'Nagi0s123' -T 'master' -I HO1-DCAPP --connections --warning 10 --critical 20
File "/usr/local/nagios/libexec/check_mssql_database.py", line 218
except EOFError, ValueError:
^
SyntaxError: invalid syntax
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H ho1-dcapp.chalhoub.org -U nagios -P Nagi0s123 --connections
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
None of them is working.
We need to resolve this issue on priority. Please help!!
Below is the output:
[root@HO1-NAGIOSXI ~]# python -V
Python 3.6.8
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]# cd /usr/local/nagios/lib
-bash: cd: /usr/local/nagios/lib: No such file or directory
[root@HO1-NAGIOSXI ~]# cd /usr/local/nagios/lib*
[root@HO1-NAGIOSXI libexec]# ls -lrt *mssql*
-rwxrwxr-x. 1 apache nagios 24835 Jun 14 13:43 check_mssql
-rwxrwxr-x. 1 apache nagios 131817 Jun 14 13:43 check_mssql_server.php
-rwxr-xr-x. 1 apache nagios 14831 Jul 28 08:09 check_mssql_database.py
-rwxr-xr-x. 1 apache nagios 21830 Jul 28 08:09 check_mssql_server.py
[root@HO1-NAGIOSXI libexec]#
[root@HO1-NAGIOSXI libexec]#
I have the above plugins in Nagios.
I changed the first command and replaced the plgin name.
Please provide proper command as well for the plugins you have provided.
I also tried all below options:
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H 10.1.0.100 -U nagios -P Nagi0s123 --deadlocks -w 1 -c 2
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
[root@HO1-NAGIOSXI libexec]# /usr/local/nagios/libexec/check_mssql_database.py -H ho1-dcapp.chalhoub.org -U 'nagios' -P 'Nagi0s123' -T 'master' -I HO1-DCAPP --connections --warning 10 --critical 20
File "/usr/local/nagios/libexec/check_mssql_database.py", line 218
except EOFError, ValueError:
^
SyntaxError: invalid syntax
[root@HO1-NAGIOSXI libexec]# ./check_mssql_server.py -H ho1-dcapp.chalhoub.org -U nagios -P Nagi0s123 --connections
File "./check_mssql_server.py", line 276
except TypeError, e:
^
SyntaxError: invalid syntax
None of them is working.
We need to resolve this issue on priority. Please help!!
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: No output returned from plugin
What is the exact XI version you are running?
What OS/version are you running?
What OS/version are you running?
Code: Select all
uname -a
cat /etc/*release
php -v
Re: No output returned from plugin
[root@HO1-NAGIOSXI ~]# uname -a
Linux HO1-NAGIOSXI 4.18.0-147.8.1.el8_1.x86_64 #1 SMP Thu Apr 9 13:49:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]# cat /etc/*release
CentOS Linux release 8.2.2004 (Core)
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
CentOS Linux release 8.2.2004 (Core)
CentOS Linux release 8.2.2004 (Core)
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]# php -v
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[root@HO1-NAGIOSXI ~]#
Linux HO1-NAGIOSXI 4.18.0-147.8.1.el8_1.x86_64 #1 SMP Thu Apr 9 13:49:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]# cat /etc/*release
CentOS Linux release 8.2.2004 (Core)
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
CentOS Linux release 8.2.2004 (Core)
CentOS Linux release 8.2.2004 (Core)
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]# php -v
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[root@HO1-NAGIOSXI ~]#
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: No output returned from plugin
Please send me a copy of your profile, you can download it from Admin > System Profile > Download Profile button.
I think this is an incompatibility with EL8, I have reported it to QA.
I think this is an incompatibility with EL8, I have reported it to QA.