Page 8 of 8

Re: Informix Monitoring

Posted: Wed Nov 21, 2018 12:03 pm
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?

Re: Informix Monitoring

Posted: Wed Nov 21, 2018 1:11 pm
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.

Re: Informix Monitoring

Posted: Wed Nov 21, 2018 1:22 pm
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

Re: Informix Monitoring

Posted: Wed Nov 21, 2018 2:04 pm
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.

Re: Informix Monitoring

Posted: Wed Nov 21, 2018 2:59 pm
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,

Re: Informix Monitoring

Posted: Mon Nov 26, 2018 9:12 am
by tgriep
Your Welcome. I'll close and lock the post for you but feel free to open a new post in the future.