Live Head Geek Video Chat: Virtualization Trends & Best Practices. Register Now >>
Search 100,602 posts and 874 resources contributed by 61,413 members or post a topic.

Already Joined? Sign in
HTTP component monitor in APM that uses returned value as Statistic?

Page 1 of 1 (7 items) | RSS

rated by 0 users
Answered (Verified) This post has 1 verified answer | 6 Replies | 4 Followers | 664 Views


49 Posts
Points 105
KenKasmar replied on Sun, Jan 31 2010 6:06 PM
rated by 0 users

In trying to leverage APM to collect statistics from actual applications in our environment I need to have an APM component hit a URL via HTTP and use the value returned by the application as the statistic (rather than just verifying the contents and returning the response time).  Is this possible with any out of the box APM component types or am I going to need to do the old 'script monitor that runs a script that does a curl or such, parses the data returned and returns the value' path?

Example:

If it hit a URI string for a server:port that an application listening on like

HTTP://server:12345/CoolApp/HttpHandlerService?Statistic=TransactionsPerSec

that service returns '325' (which would be the statistic that I want to capture for this polling cycle).

Sr Systems Engineer, Enterprise Automation
The Walt Disney Company

Answered (Verified) Verified Answer


25 Posts
Points 151
SolarWinds Employee
Answered (Verified) romkon replied on Mon, Feb 1 2010 2:52 AM
rated by 0 users
Verified by KenKasmar

No out of box APM component does that.

I have created vbscript for you.

It has not been fully tested and is far from being perfect but it does the job (providing that those requested pages don't return html but simple text).

'---------------------------------------------------------------

args = WScript.Arguments.Count

if args <> 1 then
  Wscript.Echo "usage: GetPage.vbs URL"
  wscript.Quit
end if

URL = WScript.Arguments.Item(0)

Set WshShell = WScript.CreateObject("WScript.Shell")

Set http = CreateObject("Microsoft.XmlHttp")

on error resume next

http.open "GET", URL, FALSE
if err <> 0 then  ExitWithError "Page " & URL & " can't be opened"

http.send ""
if err <> 0 then  ExitWithError "Page " & URL & " can't be sent"

on error goto 0

if http.status <> 200 then ExitWithError "Requesting page " & URL & " returned error status: " & http.statusText

ExitWithSucess "Page " & URL & " processed sucesfully", http.responseText

sub ExitWithError(message)
 WScript.Echo "Message: - " & message
 WScript.Echo "Statistic: 0"
    WScript.Quit( 1 )
end sub

sub ExitWithSucess(message, statistics)
 WScript.Echo "Message: - " & message
 WScript.Echo "Statistic: " & statistics
    WScript.Quit( 0 )
end sub

Roman Konecny
IPAM Development Lead
SolarWinds
  • | Post Points: 25

All Replies


199 Posts
Points 1,637
SolarWinds Employee
jiri.tomek replied on Mon, Feb 1 2010 2:11 AM
rated by 0 users

Hello Ken,

HTTP monitors can be used only to check if page contains required string or not. If you need to get some data and parse it, you need to create custom script for that.

Jiří Tomek
APM & Virtualization Developer
Solarwinds
Brno, CZ

  • | Post Points: 1

25 Posts
Points 151
SolarWinds Employee
Answered (Verified) romkon replied on Mon, Feb 1 2010 2:52 AM
rated by 0 users
Verified by KenKasmar

No out of box APM component does that.

I have created vbscript for you.

It has not been fully tested and is far from being perfect but it does the job (providing that those requested pages don't return html but simple text).

'---------------------------------------------------------------

args = WScript.Arguments.Count

if args <> 1 then
  Wscript.Echo "usage: GetPage.vbs URL"
  wscript.Quit
end if

URL = WScript.Arguments.Item(0)

Set WshShell = WScript.CreateObject("WScript.Shell")

Set http = CreateObject("Microsoft.XmlHttp")

on error resume next

http.open "GET", URL, FALSE
if err <> 0 then  ExitWithError "Page " & URL & " can't be opened"

http.send ""
if err <> 0 then  ExitWithError "Page " & URL & " can't be sent"

on error goto 0

if http.status <> 200 then ExitWithError "Requesting page " & URL & " returned error status: " & http.statusText

ExitWithSucess "Page " & URL & " processed sucesfully", http.responseText

sub ExitWithError(message)
 WScript.Echo "Message: - " & message
 WScript.Echo "Statistic: 0"
    WScript.Quit( 1 )
end sub

sub ExitWithSucess(message, statistics)
 WScript.Echo "Message: - " & message
 WScript.Echo "Statistic: " & statistics
    WScript.Quit( 0 )
end sub

Roman Konecny
IPAM Development Lead
SolarWinds
  • | Post Points: 25

49 Posts
Points 105
KenKasmar replied on Mon, Feb 1 2010 3:14 AM
rated by 0 users

Thanks Roman for the fast reply!  That should more or less do the trick!

Any thoughts on the performance impact to NPM and external Pollers if I were to have more than just a few components polling using this 'call VBS' method?  Maybe 7000+ spread over two pollers?

 

Thanks,

Ken

Sr Systems Engineer, Enterprise Automation
The Walt Disney Company

  • | Post Points: 3

25 Posts
Points 151
SolarWinds Employee
romkon replied on Mon, Feb 1 2010 5:30 AM
rated by 0 users

Hi Ken,

well 3500+ for one poller is for default 5min polling frequency 11+ polls per second. vbscript monitor is not designed to be fast but rather versatile. For each poll it creates template file with script content and runs external process 'cscript.exe' to interpret it. None of these is fast.

However, I think, and it is just my guess not supported by enough facts, that this performance impact shall not be critical. It also depends on how much process power is used by NPM polling.

I would strongly suggest to do some performance tests which simulates this. If you found out too much you can lover polling frequency (polling frequency from template is by default inherited in assigned applications so it is one place change).

If you decide to do these test can you please post results.

Regards,

Roman Konecny
IPAM Development Lead
SolarWinds
  • | Post Points: 3

23 Posts
Points 71
ptspts replied on Tue, Apr 27 2010 12:29 PM
rated by 0 users

Hi there,

Have you guys tried this?

Hit the URL, wait for 10 seconds, try again, wait for another 10 seconds, try the third time, wait 10 seconds, if the url is still not reachable after three tries (30 seconds), send the alert notifications.

  • | Post Points: 1

443 Posts
Points 6,751
Thwack MVP
ecornwell replied on Fri, Jul 23 2010 9:50 AM
rated by 0 users


Does this still return the response time of the request?  We have a couple pages that we want to monitor for two things.

1. Reponse Time
2. Static data on the page

The page returns something like:  Records 32235

Thanks!

2 Orion NPM 9.5.1 SLX, 2 Additional Polling Engines, IP SLA Manager 3.1, NTA 3.5, APM 3.0, NCM 5.5.2, EOC 1.2

  • | Post Points: 1
Page 1 of 1 (7 items) | RSS

© 2003 - 2010 SolarWinds, Inc. All Rights Reserved.

Who is SolarWinds?

SolarWinds is rewriting the rules for how companies manage their networks. Guided by a global community of network engineers, SolarWinds develops simple and powerful network management software and network monitoring software for networks of all sizes. SolarWinds also offers a network certification program to become a SolarWinds Certified Professional (SCP).

What is thwack?

thwack, SolarWinds online community site, was designed by network engineers, for network engineers. thwack is a vibrant, growing community of more than 30,000 IT pros who share a passion for technology.

Explore Resources, Answers, Templates, and Advice

Download Free Networking Tools


Learn More About SolarWinds Products