Hi,
I would like to create a external monitor health check that use TCP 11277 and send the command:
- “GET / ctrl_vip_acct_trrloader”
The answer expect is:
“VALUE ctrl_vip_acct_trrloader 0 27”
How can I do this in TCL script?
Tks
Best regards,
Alessandro
system
2
hello below is an external health monitor script that has been tested
#!/usr/bin/python
import os, sys, socket, re
host = os.environ['HM\_SRV\_IPADDR']
port = int(os.environ['HM\_SRV\_PORT'])
send\_string = sys.argv[1]
send\_string \+= "\\r\\n"
receive\_string = sys.argv[2]
try:
s = socket.socket(socket.AF\_INET, socket.SOCK\_STREAM)
s.connect((host, port))
s.send(send\_string)
response = s.recv(8192)
except:
sys.exit(-1)
if(None != re.search(r"%s" % receive\_string, response)):
sys.exit(0)
else:
sys.exit(-1)
They applied the External HM as recommended by Mischa, considering:
health monitor TCP-11277
method external program “TCP Health Check” arguments “\“get / ctrl_vip_acct_trrloade\” \“VALUE ctrl_vip_acct_trrloader 0 27\””
!
That´s it ssacchi, now I have the script working fine.
Thank for help
Regards
Alessandro