Add Phantomjs' loadspeed.js to notification
Add Phantomjs' loadspeed.js to notification
Hi, can you help me on my problem on Phantomjs' loadspeed.js to be added in notificationwhether it is warning or critical?
here's the link https://github.com/ariya/phantomjs/blob ... adspeed.js
here's the sample:
/etc/nagios3# phantomjs loadspeed.js http://nagios.org
Page title is Nagios - The Industry Standard in IT Infrastructure Monitoring
Loading time 5293 msec
How can I make the 5293 msec result if the output is more than 4 then it will go critical?
Thank you
here's the link https://github.com/ariya/phantomjs/blob ... adspeed.js
here's the sample:
/etc/nagios3# phantomjs loadspeed.js http://nagios.org
Page title is Nagios - The Industry Standard in IT Infrastructure Monitoring
Loading time 5293 msec
How can I make the 5293 msec result if the output is more than 4 then it will go critical?
Thank you
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Add Phantomjs' loadspeed.js to notification
It doesn't appear that you can. This script is not intended as a nagios plugin. It has no support for thresholds, or different exit codes.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Add Phantomjs' loadspeed.js to notification
Thank you for the prompt reply sir sreinhardt.
Do you have in mind a nagios plugin that can help to my problem on monitoring a site's page load time?
Thank you
Do you have in mind a nagios plugin that can help to my problem on monitoring a site's page load time?
Thank you
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Add Phantomjs' loadspeed.js to notification
I certainly do! Nagios plugins has a check_http that should be able to do just that. The command below should do the trick:
If you need to request a specific uri, you can append the -U option as well like:
There are many other flags and possible checks as with that plugin as well, but if you only wish to check response time, that should do it!
Edit: It looks like you might be on ubuntu or debian, so your path for plugins might be different, most likely /usr/lib/plugins/ or /usr/lib64/plugins/
Code: Select all
cd /usr/local/nagios/libexec/
./check_http -H google.com -w 300 -c 400
Code: Select all
check_http -H google.com -w 300 -c 400 -u /index.php
Edit: It looks like you might be on ubuntu or debian, so your path for plugins might be different, most likely /usr/lib/plugins/ or /usr/lib64/plugins/
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Add Phantomjs' loadspeed.js to notification
Thank you sir. I'm already enlightened.
Re: Add Phantomjs' loadspeed.js to notification
It is worth noting that the check_http plugin will not actually execute the javascript on the page, so if there are some elements that would take some time to be loaded using JS that will not be reflected. check_http will just show how long it takes to get the source of the web page.
Former Nagios employee
-
- Posts: 2
- Joined: Tue Apr 21, 2015 9:00 am
Re: Add Phantomjs' loadspeed.js to notification
Hi guys
I wanted to say Im in the same predicament and would like to monitor website load times. But I wanted to ask if you could provide a step by step guide on how to do it. I installed the plugin and expected to see it in the gui and or dashboard. but there was nothing.
I would like to know how to set the thresholds alerts etc.
looking forward to hearing back from you.
I wanted to say Im in the same predicament and would like to monitor website load times. But I wanted to ask if you could provide a step by step guide on how to do it. I installed the plugin and expected to see it in the gui and or dashboard. but there was nothing.
I would like to know how to set the thresholds alerts etc.
looking forward to hearing back from you.
Re: Add Phantomjs' loadspeed.js to notification
Which plugin are you referring to? The link in the original post is not a plugin, just a script in what appears to be Node.js
Former Nagios employee
-
- Posts: 2
- Joined: Tue Apr 21, 2015 9:00 am
Re: Add Phantomjs' loadspeed.js to notification
Thanks for getting back to me quickly.
The plugin I'm on about is found here
http://exchange.nagios.org/directory/Pl ... ed/details
Or have I got it wrong?
I'm not a developer and don't really understand code as much. But I would like to monitor and set alerts on nagios xi to monitor a few of our websites hosted on AWS. most importantly website page load times
The plugin I'm on about is found here
http://exchange.nagios.org/directory/Pl ... ed/details
Or have I got it wrong?
I'm not a developer and don't really understand code as much. But I would like to monitor and set alerts on nagios xi to monitor a few of our websites hosted on AWS. most importantly website page load times
Re: Add Phantomjs' loadspeed.js to notification
After installing the plugin, it will be available at /usr/local/nagios/libexec/ in the CLI. Can you find it there? Based on your link it should be called check_website_speed.php. I recommend you run it from the CLI first, to get a hang of the arguments for that plugin.
This guide should be supplemental to the process: http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Please let us know if you have any questions. Thanks!
This guide should be supplemental to the process: http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Please let us know if you have any questions. Thanks!