KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

HTTP request as action?

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
dmertens



Joined: 23 Jun 2002
Posts: 15

PostPosted: Thu Nov 18, 2004 11:41 am    Post subject: HTTP request as action? Reply with quote

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
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Nov 18, 2004 1:26 pm    Post subject: Reply with quote

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

Quote from the manual:
Quote:

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/addevent.php?Test=%TestName%&Status=%Status% %0D%0A%0D%0A
Wait for answer: 0


Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
dmertens



Joined: 23 Jun 2002
Posts: 15

PostPosted: Fri Nov 19, 2004 12:57 am    Post subject: Perfect! Reply with quote

Thanks Alex, that’s exactly what I need

Kind regards,

Danny
Back to top
View user's profile Send private message
dmertens



Joined: 23 Jun 2002
Posts: 15

PostPosted: Tue Nov 23, 2004 9:34 am    Post subject: Reply with quote

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?action=new&status=2&field0=soortbinnenkomstid&value0=bF0001&field1=persoonid&value1=0F006D&replacefield0=incident_domeinid&searchfield0=naam&searchvalue0=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
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Tue Nov 23, 2004 1:27 pm    Post subject: Reply with quote

My previous post contains example

Ok, there is
===============
Server: pcmerd
Port: 8080
Protocol: TCP
Init packet: http://pcmerd/tas/secure/incident?action=new&status=2&field0=soortbinnenkomstid&value0=bF0001&field1=persoonid&value1=0F006D&replacefield0=incident_domeinid&searchfield0=naam&searchvalue0=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
Back to top
View user's profile Send private message Visit poster's website
dmertens



Joined: 23 Jun 2002
Posts: 15

PostPosted: Thu Nov 25, 2004 2:33 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Nov 25, 2004 12:49 pm    Post subject: Reply with quote

Quote:
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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index