17-Jan-2023 16:45
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
18-Jan-2023 00:02 - edited 18-Jan-2023 00:03
@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:
You may also see the monitor provide results other than what you are expecting.
Environment
Cause
This error can be caused in two ways:
Recommended Actions
Apply the proper program name or import the proper program file into the device when creating the monitor.
Please check these links:
https://support.f5.com/csp/article/K11842240
https://support.f5.com/csp/article/K13397
https://clouddocs.f5.com/cli/tmsh-reference/v15/modules/gtm/gtm_monitor_external.html
show running-config external
list external
https://support.f5.com/csp/article/K16506028
https://codygreen.com/2014/06/23/configuring-and-testing-an-external-monitor/
Check the permissions on the monitor, should be be read/write/execute by root.
If it's a production unit, I recommend to do it in a maintenance window.
Or, you may want to work with F5 support?
18-Jan-2023 14:40
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?
19-Jan-2023 13:39
script is added to both GTM in the sync group
19-Jan-2023 14:19 - edited 19-Jan-2023 14:20
What about LTM ? The GTM can delegate the probes to the LTM devices 😀
19-Jan-2023 13:44
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