Forum Discussion

Zuke's avatar
Zuke
Icon for Cirrostratus rankCirrostratus
Sep 16, 2019

Scripted monitoring

We have a requirement for a new kind of monitoring for a database application.

 

Two pool members are actively listening on all ports. The customer is requesting a monitor that will

 

1) authenticate using a username/password to one pool member

2) execute a sudo command referencing a script on the box.

3) Then, based on the return code being a 0 or 1, send the traffic to one pool member or another.

 

 

 

3 Replies

    • Zuke's avatar
      Zuke
      Icon for Cirrostratus rankCirrostratus

      Following the steps listed in the article, I created a script in /usr/bin/monitors.

      However when I create the script in that directory, chmod to 755, I still don't see it on the GUI. I get an error when I try to add it and specify the path.

      [:/S1-green-P:Active:In Sync] monitors # pwd
      /usr/bin/monitors
      [/S1-green-P:Active:In Sync] monitors # ls -l | grep custom
      -rwxr-xr-x. 1 root webusers 2379 2019-09-17 12:59 custom_monitor.bash
      (tmos)# modify ltm monitor external custom_monitor run "/usr/bin/custom_monitor.bash"
      0107134a:3: File object by name (/usr/bin/custom_monitor.bash) is missing.
       
       
      (tmos)# modify ltm monitor external custom_monitor run
      Options:
       none
      Configuration Items:
       Exchange2016-smtp.app/  arg_example       sample_monitor
       
       
      • Hedbert_Carrasc's avatar
        Hedbert_Carrasc
        Icon for Nimbostratus rankNimbostratus

        Because the correct path is /usr/bin/monitors/custom_monitor.bash. For instance, the command is

        # modify ltm monitor external custom_monitor run "/usr/bin/monitors/custom_monitor.bash"