Page 1 of 1

(No output on stdout) stderr: mssql_server.py plugins

Posted: Thu Feb 20, 2020 3:22 am
by Auel
Please,can someone give me an example of how to define the service of this plugins?

mssql_server.py

My command definition
define command {
command_name check_mssql_database
command_line $USER1$/check_mssql_database.py -H $HOSTADDRESS$ $ARG1$ $ARG2$
}
My definition service
define service{
use generic-service
host_name DataMV
service_description mssql_server
check_command check_mssql_database!my user!my passwdord!1433!-w 50 -c 80 --cpu
}
Result:
(No output on stdout) stderr: Usage: check_mssql_database.py -H hostname -U user -P password -T table --mode

I want to check only the cpu
Please i need help
Thanks
Auel

Re: (No output on stdout) stderr: mssql_server.py plugins

Posted: Thu Feb 20, 2020 2:46 pm
by scottwilkerson
Auel wrote:I want to check only the cpu
CPU is not part of this plugin.

I gave you a working example in this post
https://support.nagios.com/forum/viewto ... 27#p304164

but you cannot use this plugin to check CPU the valid modes for this plugin are

Code: Select all

  Mode Options:
    --logshrinks        Log Shrinks
    --transpsec         Transactions Per Second
    --logfileusage      Log File Usage
    --logwait           Log Flush Wait Time
    --datasize          Database Size
    --activetrans       Active Transactions
    --logflushes        Log Flushes Per Second
    --logcachehit       Log Cache Hit Ratio
    --loggrowths        Log Growths
    --test              Run tests of all queries against the database.
    --time2connect      Time to connect to the database.
    --logtruncs         Log Truncations
you would need to install some sort of agent such as NCPA to perform CPU checks.

You may also want to consider Nagios XI as it has easy to use wizards that can perform all of this for you
https://www.nagios.com/products/nagios-xi/