Test an alert 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).
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

Test an alert action.

Post by Offer »

Hello!

I remember I've tried it long ago without success:
How can I mimic an error so I can test how HostMonitor will activate the Alert action (in my case - Send SMS to me) with correct parameters etc.?

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

Post by KS-Soft »

Test properties dialog -> "Reverse alert" option

Regards
Alex
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

Thanks, and a second phase, please:

Post by Offer »

Thanks for the idea, Alex.

I've tried it, and it fires the needed action.

Now I'm dealing with the next stage in a problem:

My Action uses HTTP request to send a SMS message.
In the action log I see the HTTP request was fired, but it's to my telephony company server so I don't have their logs.
All I know is that I don't get any SMS and when I send the same URL from my computer it sends it ok.

How can I see what exactly was sent when firing the HTTP request action?

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

Post by KS-Soft »

HTTP? not HTTPS?
Then its easy, use wireshark
https://www.wireshark.org/download.html

Regards
Alex
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

Post by Offer »

Thanks, I'll look into it (probably prefer not to install another tools on my servers..),

But isn't it a log file of HostMonitor that shows what exactly did it do?

(and if not yet - I think it's a great idea for a feature request).

Many thanks again.
I'll try to see if wireshark can solve me this.
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

HTTP request action - strange behavior. Maybe a bug?

Post by Offer »

Ok.
I looked now using Wireshark, saw the HTTP request goes out, and then came back error 400 from the remote server.

Tried to copy the request from the textbox in the action definition and just pasted it into the URL bar of Internet Explorer - and it worked ok.

How come that the exact same URL string (no macros or sophisticated things) from Internet Explorer works, and from HostMonitor it gets error 400?

Thanks for looking into this.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

(and if not yet - I think it's a great idea for a feature request).
In many cases this is not possible, e.g. HostMonitor does not directly create all data packets transmitted between Windows systems. Windows does.
Well, its possible, but it would become different kind of software - network packet analyzer. Wireshark.

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

Post by KS-Soft »

How come that the exact same URL string (no macros or sophisticated things) from Internet Explorer works, and from HostMonitor it gets error 400?
We do not have data you collected and we do not have access to web server.
But if you send data packets to support@ks-soft.net, may be we will have some idea.

Regards
Alex
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

It seems to be Host-Monitor's behavior...

Post by Offer »

Dear Alex,

Thanks, again, for looking into it, but I must say I'm disappointed.

If you look into the behavior of this issue (same url works in browser and not in Host-Monitor) - it's defenately a software issue. Maybe it's a lack of 'accept type definition' in the HTTP call, or any other formatting issue when Host-Monitor tries to make this action to work.

To my opinion, Wireshark can help debugging it, but it doesn't make the 'normal use scenario' to need to use it to find what's wrong with Host-Monitor's way to make the HTTP call...

And one last nice nostalgy thing:
When googling my issue, this thread came up:
https://www.ks-soft.net/phpBB/viewtopic ... c2830b595a
It's from 2004, I think, with really similar issue (back then there wasn't HTTP request action but TCP/IP call), and the nice thing is that the software had many improvement since then, and at the same time - Commited Alex stayed and is helping people over and over again (and some of the issues also are similar all over the years...)

Wish you, Alex, many more happy years of good communications and user-relations!

Be well!

(and if someone there would be able to use Wireshark to compare Host-Monitor HTTP calls to a simple browser making the same calls - you'll be blessed..)

Thanks again! All the best!
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Thanks, again, for looking into it, but I must say I'm disappointed.
If you look into the behavior of this issue (same url works in browser and not in Host-Monitor) - it's defenately a software issue. Maybe it's a lack of 'accept type definition' in the HTTP call, or any other formatting issue when Host-Monitor tries to make this action to work.
How we can look if you do not provide any data?
We do not see test settings that trigger action, we do not see action settings, we don't know what web site is used, we do not see data packets.
Yes, we can guess for a week or a months, yes maybe it's a lack of 'accept type definition' in the HTTP call, may be not; but it would be much more effective if you provide data you have (and we don't have).
Could you please provide test and action details, link to manual (I assume there is some manual provided by SMS service you are using) and captured packets to support@ks-soft.net?

btw: have you tried to contact your SMS provider and ask them to check the logs?
To my opinion, Wireshark can help debugging it, but it doesn't make the 'normal use scenario' to need to use it to find what's wrong with Host-Monitor's way to make the HTTP call...
Sure we can make such logging for HTTP requests. But there are 200 other possible requests and protocols used by HostMonitor, some of them not fully controlled by HostMonitor. This means we have to intercept all data packets.
And still you need WireShark, tcpdump or similar program if you are network administrator. Usually network administrator manages many servers and work with different software, right? So you need some tool that can help to check what is wrong with any of such service/software.

Yes, we can improve HostMonitor (and we are doing this every day).
Yes, we can build in more tools into HostMonitor - network packet analyzer, ssh server, add cluster functions and so on.
But this is different topic, we will not do anything of this in February 2020. If you have some ideas, welcome to "Wish list" forum.

Regards
Alex
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

Thanks, and some new results..

Post by Offer »

Dear Alex,

Thanks again for taking the time to look into my issue and reply me with this great detail. I appreciate that.

I'll try to explain what I mean when I ask you (as a system) to look into such an issue, and not just waste your time on my specific HTTP request.

As it seems to me, there is a difference, as a behavior, between the way a normal browser sends normal URL/HTTP request to a normal server, and the way the "HTTP Action" of Host Monitor does it.

As I'm playing with Wireshark, it seems the format of HTTP request comes from the Action is different (even when calling www.cnn.com, www.ynet.co.il, etc.), and even between the HTTP test of Host monitor to the HTTP action.

For example, in my case, I've succeeded now to send the URL to my SMS provider using the "HTTP test", but only after checking the "Follow Redirect" checkbox in the test properties, but my provider promises me there is no redirect in the server I'm requesting to.

And in any case, I don't have that checkbox on the "HTTP Action" to check.

Because of that (what looks to me like erratic) behavior (and the old post from 2004 which suggested similar behavior - difference when the call comes from Host monitor than from Browser or simple VB.Net call in my case), I tried to mention the option of better investigation into the mechanism of HTTP-request-send by Host monitor.

I'm working really hard now, with technical support of my SMS provider, to try and trace the root of the difference that makes it not to work.


I promise to update when we'll find a solution, for the sake of all HTTP users of this really great system of you.

Meanwhile, any insights would be appreciated.

All The Best!
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

May I ask why you are ignoring my requests and do not provide data to us?

Regards
Alex
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

Post by Offer »

I'm sorry for that.
I'll be glad to give you all the data I have - so you can re-create the issue and test it on your system.
Will that be ok?

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

Post by KS-Soft »

Thank you for the URL but I asked for more details - data logged by wireshark, action settings (optionally test settings and results, I assume action uses some variables and gets data from the test?)

Also, your address is not registered in our system, we cannot find your license.
Could you please send your order number and/or registration name to support as well?

Regards
Alex
Offer
Posts: 21
Joined: Mon Dec 13, 2010 10:43 am

Post by Offer »

KS-Soft wrote:May I ask why you are ignoring my requests and do not provide data to us?

Regards
Alex

Dear Alex,

I had some days to think about that question (during continuous tests and tries to understand how HTTP action work in Host Monitor).

And here is what bothers me:
Now it's sure and clear that HTTP action of Host Monitor has a basic bug (or mis-behavior) at its core.
You can see very old posts asking about not getting right answers when using Host monitor to send HTTP requests.

For example, here is a snip of the wireshark trace of running the HTTP call action:

Code: Select all

No.	Time	Source	Destination	Protocol	Length	Info
3	11.937041	10.253.2.13	45.60.14.181	TCP	62	4353 → 80 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 SACK_PERM=1
4	11.986023	45.60.14.181	10.253.2.13	TCP	62	80 → 4353 [SYN, ACK] Seq=0 Ack=1 Win=29200 Len=0 MSS=1460 SACK_PERM=1
5	11.986063	10.253.2.13	45.60.14.181	TCP	54	4353 → 80 [ACK] Seq=1 Ack=1 Win=65535 Len=0
6	11.986349	10.253.2.13	45.60.14.181	HTTP	389	GET /sms/index.php?app=ws&u=mehdrin&h=6b74a919e3b06356fa61c&op=pv&from=HostMonitor&to=925444412345&msg=Problem+with+Host.%0D%0Aping%20%28timeout%20%2D%202000%20ms%29+got+Bad.+%0D%0A+BezeqLine%3A%2003%2D622739 HTTP/1.0 
7	11.986450	10.253.2.13	45.60.14.181	TCP	54	4353 → 80 [FIN, ACK] Seq=336 Ack=1 Win=65535 Len=0
The provider's server manager showed me that right after the HTTP GET call, the program sends - right away - [FIN, ACK] without waiting to the server to respond, what makes (to his opinion) the HTTP call to be canceled.

I got the feel that instead of looking into the HTTP request action issue as a Host-Monitor issue - we're going back and forth about my settings, the provider's server, his manual, etc. etc. when it's clearly an issue that is more basic than my specific url, server, or issue.

Sending me again and again to try, collect, and send more and more information - feels to me like throwing the ball in the wrong direction.

One last thing: If I'm wrong, and good people around here can show and tell about their HTTP call actions which are working great, without issues and anomalies, and we'll find that it's really a specific issue with my setup or my provider - I'll put here, in the forum, my full apology to you personally, and to ks-soft.
Post Reply