0

Hi I have deployed icinga monitoring solution using the blog which is here

Now I want to monitor multiple DB servers which are windows DB servers. I have placed the service description for DB Monitoring in localhost_icinga.cfg but it is not working. Though its not giving me error, its not giving me status check ok either.

I am using below command definition at /etc/nagios-plugins/config/mssql.cfg

define command{
           command_name    check_mssql
           command_line    $USER1$/check_mssql.py -H '$HOSTALIAS$' -p '$ARG1$' -u '$ARG2$' -p '$ARG3$' '$ARG4$' -w '$ARG5$' -c '$ARG6$'
           }

here is service description which i am using in localhost_icinga.cfg file which is at location /etc/icinga/objects/

define service{
        use                     generic-service
        host_name               SomeDB
        service_description     MS-SQL Monitor
        check_command           check_mssql!1433!someappuser!someapp@user1!--bufferhitratio!95:!90:
        }

To be more precise '$HOSTALIAS$' is used because I am using this in azure and I am using cloud service and an endpoint(port). For instance it could be azure.cloudapp.net and port could be 1478

I would highly appreciate any suggestion,comments from experts. I am using ubuntu 14.04 trusty Thank you.

Shailesh Sutar
  • 1,427
  • 4
  • 22
  • 40
  • What happens when you run: ``` /usr/lib/nagios/plugins/check_mssql.py -H ... ``` Preferably with use system user "nagios" to make sure it is not a local problem. – lazyfrosch Jun 03 '15 at 18:37
  • if I run this command as root it works fine. here is the output – Shailesh Sutar Jun 04 '15 at 02:38
  • if I run this command as root it works fine. here is the output ./check_mssql.py -H somecloud.cloudapp.net -p 1414 -U someuser -P some@user1 --bufferhitratio -w 95: -c 90: OK: Buffer Cache Hit Ratio is 100.0%|buffer_cache_hit_ratio=100.0%;95:;90:;; But when i run it as icinga user which is "nagios" in my case gives the same result but for that I've to enable "/bin/bash" in /etc/passwd for nagios user. by default login is disabled for nagios user. – Shailesh Sutar Jun 04 '15 at 02:54

0 Answers0