HTTP request as action?

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
dmertens
Posts: 15
Joined: Sun Jun 23, 2002 6:00 pm

HTTP request as action?

Post by dmertens »

Hello Alex,

Is there a way to send a HTTP request after a test has failed?
I would like to make a incident in our helpdesk software and this is possible with an HTTP request.

If not do you now a script or program that I can use for this purpose, then I maybe can use the option Execute external program in HostMonitor

Thanks in advance

Kind regards

Danny
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Use "Send data to TCP/UDP port" action.
http://www.ks-soft.net/hostmon.eng/mfra ... #actTcpUdp

Quote from the manual:
Sends data to the specified host using TCP or UDP protocol. In addition to the common action parameters, the «Send data to TCP/UDP port» action has the following options:
...
...
For example using this action you can perform HTTP request:
Server: www.myserver.com
Port: 80
Protocol: TCP
Init packet: GET http://www.myserver.com/cgi-bin/addeven ... us=%Status% %0D%0A%0D%0A
Wait for answer: 0
Regards
Alex
dmertens
Posts: 15
Joined: Sun Jun 23, 2002 6:00 pm

Perfect!

Post by dmertens »

Thanks Alex, that’s exactly what I need :D

Kind regards,

Danny
dmertens
Posts: 15
Joined: Sun Jun 23, 2002 6:00 pm

Post by dmertens »

Alex,

I want to send this http request to TOPdesk (helpdesk app) but I have a problem, can you please give me an example how to do this

URL

http://pcmerd:8080/tas/secure/incident? ... chvalue0=6 - Networking&replacefield1=incident_specid&searchfield1=naam&searchvalue1=Server&replacefield2=actiedoorid&searchfield2=ref_dynanaam&searchvalue2=System management&field2=doorlooptijdid&value2=0N0001&replacefield3=configuratieobjectid&searchfield3=ref_hostnaam&searchvalue3=nlgfkex01&j_username=motd&j_password=motd0&save=true

Kind regards,

Danny
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

My previous post contains example

Ok, there is
===============
Server: pcmerd
Port: 8080
Protocol: TCP
Init packet: http://pcmerd/tas/secure/incident?actio ... chvalue0=6 - Networking&replacefield1=incident_specid&searchfield1=naam&searchvalue1=Server&replacefield2=actiedoorid&searchfield2=ref_dynanaam&searchvalue2=System management&field2=doorlooptijdid&value2=0N0001&replacefield3=configuratieobjectid&searchfield3=ref_hostnaam&searchvalue3=nlgfkex01&j_username=motd&j_password=motd0&save=true%0D%0A%0D%0A
Wait for answer: 0
===============
Doesnt work?

Regards
Alex
dmertens
Posts: 15
Joined: Sun Jun 23, 2002 6:00 pm

Post by dmertens »

Hello Alex,

OK now I’m sure, I did everything correct, no it’s not working then.
Is it possible to view if the action was send, because now I don’t get an incident, but I’m not sure where the problem is coming from, Hostmonitor or TOPdesk.

If I use the URL in IE everything works fine, the only problem I have is that my incident isn’t saved, length of the URL???? But the card is created and all the fields are filled in like requested, so I’m pretty sure the URL is OK.

Is the URL length a problem for the action in Hostmonitor?

Thanks in advance

Kind regards,

Danny
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Is the URL length a problem for the action in Hostmonitor?
Should not be.
You may enable action logging (Advanced Logging page in the Options dialog) and check what is going on.
Also some netwok sniffer can be very useful...

Regards
Alex
Post Reply