For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

xeeshanmohsin's avatar
xeeshanmohsin
Icon for Nimbostratus rankNimbostratus
Jan 18, 2023

GTM/DNS external monitor for proxy

I have setup a external monitor on our GTM using https://support.f5.com/csp/article/K31435017

I want to monitor if the proxy has internet access or not. 

if I run the script on F5 cli it return "up" but when i attach it to the I get below error

Monitor instance /Common/SquidMonTest x.x.x.x:xx CHECKING --> DOWN from x.x.x.x (state executable not found)

I enabled debugging but it did not help much.

appreciate it if someone can point me in the right direction

 

5 Replies

  •  xeeshanmohsin,

    Can you share the details of the external monitor that you have created to check the Syntax.

    You are seeing an error similar to the following in /var/log/gtm:


    gtmd[<PID>]: 011a4003:1: SNMP_TRAP: Pool /Common/<pool> member /Common/<virtual_server> (ip:port=<ip_address>:<port>) state change green --> red ( Monitor <monitor> from <ip_address> : missing program name)


    You may also see the monitor provide results other than what you are expecting.

    Environment

     

    • Nikoolayy1's avatar
      Nikoolayy1
      Icon for MVP rankMVP

      I do not renember if the script should also be added on all F5 devices in a DNS sync group or prober pool to be used just so only the GTM with the script to do the job?

    • xeeshanmohsin's avatar
      xeeshanmohsin
      Icon for Nimbostratus rankNimbostratus

      I am not seeing missing program name error in the logs

       

      script is below

       

      # start sample script
      #!/bin/sh
      # (c) Copyright 1996-2007 F5 Networks, Inc.
      #
      # @(#) $Id: http_monitor_cURL+GET,v 1.0 2007/06/28 16:10:15 deb Exp $
      # (based on sample_monitor,v 1.3 2005/02/04 18:47:17 saxon)
      #
      # these arguments supplied automatically for all external monitors:
      # $1 = IP (IPv6 notation. IPv4 addresses are passed in the form
      # ::ffff:w.x.y.z
      # where "w.x.y.z" is the IPv4 address)
      # $2 = port (decimal, host byte order)
      #
      # Additional command line arguments ($3 and higher) may be specified in the monitor template
      # This example does not expect any additional command line arguments
      #
      # Name/Value pairs may also be specified in the monitor template
      # This example expects the following Name/Vaule pairs:
      #URI = "crl.entrust.net"
      #RECV = "Not found"
      #
      # remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format)
      IP=`echo ${1} | sed 's/::ffff://'`
      PORT=${2}

      PIDFILE="/var/run/`basename ${0}`.${IP}_${PORT}.pid"
      # kill of the last instance of this monitor if hung and log current pid
      if [ -f $PIDFILE ]
      then
      echo "EAV exceeded runtime needed to kill ${IP}:${PORT}" | logger -p local0.error
      kill -9 `cat $PIDFILE` > /dev/null 2>&1
      fi
      echo "$$" > $PIDFILE

      # send request & check for expected response
      l
      curl --no-buffer -s http://crl.entrust.net --proxy x.x.x.x:xx | grep -i "Not found" 2>&1 > /dev/null


      # mark node UP if expected response was received
      if [ $? -eq 0 ]
      then
      rm -f $PIDFILE
      echo "UP"
      else
      rm -f $PIDFILE
      fi
      exit
      # End sample script