cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Need help with SAM HTTP monitor

Hello All,

 

I am trying to setup a http monitor in SAM that is dynamic and runs on different hosts. When i use Node.Sysname variable i am getting the below error.

URL:

http://${Nodes.SysName}:${PORT}/servlet/raApp

ERROR: 

[Errno -2] Name or service not known

 

But when i run with actual host name i am able to get it running successfully. This is not working even with $IP variable. Can someone please help me with this?

0 Kudos
2 Replies

As an alternative to what @Vinx has suggested, you could use PowerShell to emulate the check carried out by the HTTP Monitor template. Take a look at this cmdlet:

Test-Netconnection:

https://docs.microsoft.com/en-us/powershell/module/nettcpip/test-netconnection?view=win10-ps

Also, as for a longer read, check this article out, which goes into further detail on how PowerShell can help test web apps:

https://docs.microsoft.com/en-us/archive/msdn-magazine/2008/march/test-run-web-ui-automation-with-wi...

The above might be overkill for what you're looking to achieve, but it might give you an idea or two!

- Jez Marsh
0 Kudos
Level 11

I tried to reproduce your problem on my env :

 

http://${IP}:${PORT}/ >> Up

- http://${Node.Caption}:${PORT}/ >> [Errno -2] Name or service not known

http://${Node.SysName}:${PORT}/ >> [Errno -2] Name or service not known

http://${Node.DNS}:${PORT}/ >> [Errno -2] Name or service not known

- http://name_of_server:nb_of_port >> [Errno -2] Name or service not known

 

So only IP address works for me. Even if put the servername and port manually in url field if does not work