Forum Discussion

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

GTM/DNS external monitor for proxy

I have setup a external monitor on our GTM using

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.



    • Nikoolayy1's avatar
      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
      Icon for Nimbostratus rankNimbostratus

      I am not seeing missing program name error in the logs


      script is below


      # start sample script
      # (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 = ""
      #RECV = "Not found"
      # remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format)
      IP=`echo ${1} | sed 's/::ffff://'`

      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 ]
      echo "EAV exceeded runtime needed to kill ${IP}:${PORT}" | logger -p local0.error
      kill -9 `cat $PIDFILE` > /dev/null 2>&1
      echo "$$" > $PIDFILE

      # send request & check for expected response
      curl --no-buffer -s --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 ]
      rm -f $PIDFILE
      echo "UP"
      rm -f $PIDFILE
      # End sample script