How to get Alert working for HTTP

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
andyfoxccp
Posts: 2
Joined: Mon Feb 21, 2011 6:35 am

How to get Alert working for HTTP

Post by andyfoxccp »

I am trying to get HOSTMON to send an alert to our servicedesk application via the API the Servicedesk provides.

Essentially it is a HTTP post so I have been trying the HTTP REQUEST action.

When you create a HTTP REQUEST action the action paramaters I set as the FQDN of the server including the path to the page

eg:
domainname/servlets/RequestServlet?
port is 8080

This creates a GET request below. As the system requires a POST I have changed it to POST so the Request reads:

http://domainname:8080/servlets/Request ... AddRequest

However this doesn't appear to work and I get an error in the system log stating "Valid name, no data record of requested type"


Can someone advise how I need to set this up to work please?
Thanks,
Andy
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

When you are using POST request, data (parameters) should be specified after HTTP header, e.g.
================
POST /servlets/RequestServlet HTTP/1.1
Host: domainname
User-Agent: Mozilla/4.0
Content-Length: 126
Content-Type: application/x-www-form-urlencoded

subject=ASF+Dummy&username=username&password=passx.&DOMAIN_NAME=xxxx&logonDomainName=Local+Authentication&operation=AddRequest
================

Regards
Alex
andyfoxccp
Posts: 2
Joined: Mon Feb 21, 2011 6:35 am

Post by andyfoxccp »

Thank you, that was enough to work out the final format - application doesn't like the 'normal' way but with a little re-arranging now working. Had to put the parameters on the POST line as well.

Much appreciated - can now fine tune and get test parameters into the post too ;-)
guibao
Posts: 6
Joined: Wed Oct 13, 2010 3:57 pm

What is wrong?

Post by guibao »

Hello,

I'm trying to send a SMS over HTTP Request using POST.


I do this:

On Action Parameters i was use this:

HOST system.human.com.br PORT 8080


On Request i was use this:

POST /GatewayIntegration/msgSms.do HTTP/1.1
Host: system.human.com.br
User-Agent: Mozilla/4.0
Content-Length: 126
Content-Type:application/x-www-form-urlencoded

dispatch=send&account=XXXXX&code=XXXXXXX=5511XXXXXX&msg=Test: %TestName%
Status : %STATUS%


When the test fail, i did not receive any SMS.

Can you help me? (sorry for my english)

Antonio.
guibao
Posts: 6
Joined: Wed Oct 13, 2010 3:57 pm

One more information

Post by guibao »

The Human Mobile (SMS Operator) Support tell me to use this link:

http://system.human.com.br:8080/Gateway ... ostMonitor Alert

How to configure this link on HostMonitor?

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

Post by KS-Soft »

When the test fail, i did not receive any SMS
How to investigate action related problems described in FAQ.
Please read the following article
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=4804

If actions enabled, there is no error in the log and so on, then probably something wrong on the other side and you should call your service provider

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

Post by KS-Soft »

The Human Mobile (SMS Operator) Support tell me to use this link:
...
So you need to use GET request?
Then type GET http://system.human.com.br:8080/Gateway ... or%20Alert HTTP/1.0 in Request field of "HTTP request" action

Regards
Alex
Dr1zzT
Posts: 1
Joined: Tue Nov 20, 2012 6:00 am

Sending an SMS alert

Post by Dr1zzT »

I am using POST request to send an SMS with the format specified in this Topic, but I don't recieve it. I have verified the configuration with an http code, so the parameters are correct.

I need some guidance with the configuration:

================
POST http://api-sms.infoavisos.net/http/httpSend.cfm HTTP/1.1
Host: api-sms.infoavisos.net
User-Agent: Mozilla/5.0
Content-Length: 115
Content-Type: application/x-www-form-urlencoded

login=XXXX@&apiID=XXXXXXXX&phone_1=+34692XXXXXX&text_1=testSMS
================
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

How to investigate action related problems described in FAQ.
Please read the following article
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=4804

If actions enabled, there is no error in the log and so on, then you should check server logs (call your service provider).
We do not own this web server (api-sms.infoavisos.net) and we do not have access to logs so we cannot tell you what exactly is wrong.
I just can suggest to change 1st line of the request to
POST /http/httpSend.cfm HTTP/1.1

Regards
Alex
Post Reply