Informix Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post by donnyforbes »

I have a question. For the script that I am using the same plugin for when doing the 'onstat -g cmsm' instead of

Code: Select all

 if [ $cmd = On-Line ]
what should I use there? Here is the output of this command when it is running correct......

Code: Select all

[root@huey libexec]# onstat -g cmsm

IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 22 days 14:18:50 -- 1138808 Kbytes
Unified Connection Manager: rmca2_cm_hueynet         Hostname: huey.sg1.allamericanasphalt.com

CLUSTER         rmca2_cluster_hq_hueynet        LOCAL
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_hq_hueynet
                                        13   rmcacmhqsoc/onsoctcp   DBSERVERS=primary,HDR

        Failover Arbitrator: Active Arbitrator, Primary is up
        ORDER=SDS,HDR PRIORITY=1 TIMEOUT=10

SERVERSET       rmca2_set_yard_hueynet
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_yard_hueynet
                                         0   rmcacmyardsoc/onsoctcp   DBSERVERS=(louienet),rmca2_cm_hq_hueynet

SERVERSET       rmca2_set_aix_hueynet
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_aix_hueynet
                                      2484   rmcacmaixsoc/onsoctcp   DBSERVERS=hueyaix,dueyaix

Unified Connection Manager: rmca2_cm_dueynet         Hostname: duey

CLUSTER         rmca2_cluster_hq_dueynet        LOCAL
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_hq_dueynet
                                       159   rmcacmhqsoc/onsoctcp   DBSERVERS=primary,HDR

        Failover Arbitrator: Primary is up
        ORDER=SDS,HDR PRIORITY=2 TIMEOUT=10

SERVERSET       rmca2_set_yard_dueynet
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_yard_dueynet
                                         0   rmcacmyardsoc/onsoctcp   DBSERVERS=(louienet),rmca2_cm_hq_dueynet

SERVERSET       rmca2_set_aix_dueynet
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_aix_dueynet
                                      2426   rmcacmaixsoc/onsoctcp   DBSERVERS=hueyaix,dueyaix

Unified Connection Manager: rmca2_cm_louienet        Hostname: louie

CLUSTER         rmca2_cluster_hq_louienet       LOCAL
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_hq_louienet
                                         8   rmcacmhqsoc/onsoctcp   DBSERVERS=primary,HDR

        Failover Arbitrator: Primary is up
        ORDER=SDS,HDR PRIORITY=3 TIMEOUT=10

SERVERSET       rmca2_set_yard_louienet
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_yard_louienet
                                         0   rmcacmyardsoc/onsoctcp   DBSERVERS=(louienet),rmca2_cm_hq_louienet

SERVERSET       rmca2_set_aix_louienet
        Informix Servers: rmcagrp
        SLA                    Connections   Service/Protocol   Rule
        rmca2_cm_aix_louienet
                                      2582   rmcacmaixsoc/onsoctcp   DBSERVERS=hueyaix,dueyaix


[root@huey libexec]#
any thoughts on this?
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post by donnyforbes »

Ok so I figured something out.... the secondary and RSS server command returns the following

IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (RSS) -- Up 25 days 12:08:30 -- 1138808 Kbytes

IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 22 days 15:24:58 -- 1138808 Kbytes

The primary returns something different.. On-Line see below.
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- On-Line (Prim) -- Up 25 days 12:09:52 -- 1269880 Kbytes

That is where the On-Line came from. So my scripts is working on both RSS and Sec, but not Primary. Should I just copy and past the script and change the from Updatable - On-Line again? Or can we add this is the main script and say???

Please advise.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post by donnyforbes »

here is what I did .. Since each command that ran came back with the following

IBM Informix Dynamic Server Version 12.10.FC8W2WE -- On-Line (Prim) -- Up 25 days 12:09:52 -- 1269880 Kbytes

I changed the script to look like this.

Code: Select all

for cmd in $result
do
  if [ $cmd = Up ]
  then
     echo $result
     exit 0
  fi
done
echo $result
exit 2
this seems to put all three servers online and show that they are online as well. My questions is if one goes down it should send notification correct?

Thanks
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post by tgriep »

The plugin does not send the Email Notifications, the settings in the Service check to that.
Take a look at this document that explains how to setup notifications in XI.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

One option for the plugin, it you change the if line to the following.

Code: Select all

if [ $cmd = On-Line ] || [ $cmd = Updatable ]
It will output an OK state if the strings has either On-Line in it or Updatable in it.
Might be better than using just Up for the check but the change is up to you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post by donnyforbes »

tgriep,
Hey got all this working now. Thank you so much for your assists I really do appreciate it. Have a great Thanks Giving.

Thank you,
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post by tgriep »

Your Welcome. I'll close and lock the post for you but feel free to open a new post in the future.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked