Page 1 of 1

performance.navigation API and Nagios (real world stats)?

Posted: Mon Jul 29, 2013 10:12 am
by disrael
Has anyone used this API to track real user load time of a website? Also has anyone integrated this with Nagios. If so is there a tool out there or was everything coded in house?

Kind Regards,

Doron

Re: performance.navigation API and Nagios (real world stats)

Posted: Mon Jul 29, 2013 10:25 am
by sreinhardt
I do not see any integration out there at the moment, doesn't mean I didn't miss it in my searches. Just to clarify, you are looking to use a javascript api to check the current load speed of a page?

Re: performance.navigation API and Nagios (real world stats)

Posted: Mon Jul 29, 2013 10:26 am
by abrist
I presume load as in cpu usage, not page load time?
The real problem with monitoring a web users load is that it may not be easy to track for most web applications. Many times httpd will just fork or agnostically serve up the pages. As most everything is run as the apache user serverside, you would have to come up with a clever solution, or implement unix system users for each of your web ui users, and then subsequently change the web code to use each user's system credentials fro operations. This could be viewed as insecure to do so. You may be able to track pids, but it will still only be part of the picture.

Maybe someone out there has a suggestion more elegant or novel.

EDIT: There are some available libraries for apache, like apache::session (cpan), but would require a rewrite of the XI code to implement. . .

Re: performance.navigation API and Nagios (real world stats)

Posted: Mon Jul 29, 2013 1:46 pm
by disrael
I was referring the time it takes to load a page for a user: http://www.html5rocks.com/en/tutorials/ ... ce/basics/

Re: performance.navigation API and Nagios (real world stats)

Posted: Mon Jul 29, 2013 2:02 pm
by sreinhardt
If I am not mistaken, wouldn't you need an external system doing the requests to your server, then somehow forwarding on the results to your nagios server? After reading the article, it seems that it modifies dom objects local to the end-user, but doesn't really send them back. I suppose it would be possible to use JS to push this data back to the server and have nagios somehow collect it. Instead were you thinking of running this on the nagios server via lynx or something to collect the page and then evaluate the dom objects?

Re: performance.navigation API and Nagios (real world stats)

Posted: Tue Jul 30, 2013 9:00 am
by disrael
What I was thinking of doing is using it similar to how Google Analitics uses it. The app owners puts a bit of javascript in the header, which runs a remote javascript on the nagios box. The Nagios system then collects the data: url, file, timeladed, ip, and etc. then sends it to a file or DB for nagios to access. We use something similar right now that requires javascript put into the header and footer for every application, though this seems like an easier way of doing it.

-Doron

Re: performance.navigation API and Nagios (real world stats)

Posted: Tue Jul 30, 2013 9:49 am
by scottwilkerson
Doron,

I haven't heard of anyone using it. It would be a little tricky, but you could write some javascript that sends the results back to Nagios XI via JSONP to the NRDP API.

The down side of this would be that you NRDP API key would be exposed if you aren't careful, so you may need to add a backend layer for security.