HTTP Monitor cURL Basic GET
The above steps might not exactly work, but are good enough to point you in the right directions.
STEPS:
- Copy the script
- Paste it on your textpad (notepad, etc)
- Import the script System > File Management > External Monitor Program File List
- Once the import is completed, a file is automatically generated under /config/filestore/files_d/Common_d/external_monitor_d.
- In this example the name if the created file is curl_monitor_ex_68725_1
- Run the following command
- sed -i 's/\r$//' /config/filestore/files_d/Common_d/external_monitor_d/\:Common\:curl_monitor_ex_68725_1
- Create the monitor and attach it to the pool
STEP #7 in an important step. If STEP 7 is skipped then you can see the following errors in /var/log/monitors/<name> (if monitor logging is enabled)
l_up=0 immed=0 next_ping=[1564634525.155247][2019-08-01 12:42:05] last_ping=[1564634520.236345][2019-08-01 12:42:00] deadline=[1564634523.946757][2019-08-01 12:42:03] on_service_list=True snd_cnt=12 rcv_cnt=0 ]
[0][6419] 2019-08-01 12:42:00.237862: ID 79 :(spawn_external_pinger): EAV execve: No such file or directory
[0][6419] 2019-08-01 12:42:00.238338: ID 79 :(_main_loop): Service ready for read, now=[1564634520.238304][2019-08-01 12:42:00] [ addr=::ffff:10.200.143.252:80 srcaddr=::%0:0 fd=13 pend=0 #conn=0 ]
[0][6419] 2019-08-01 12:42:00.238374: ID 79 :(_recv_external_node_ping): reading [ addr=::ffff:x.x.x.x:80 ]
[0][6419] 2019-08-01 12:42:00.238397: ID 79 :(recv_external_node_ping): EAV failed [ addr=::ffff:x.x.x.x:80 ]
[0][6419] 2019-08-01 12:42:00.238421: ID 79 :(_kill_external_pinger): killing pid=2642 [ addr=::ffff:x.x.x.x:80 fd=13 ]