New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Going to test it tomorrow I really have to sleep now
Keep in mind that you need to adjust your IPTables in order to be able to open the port from the server the script is running and on the server the script tries to connect to. Thus, you will need to pierce your firewall. It is therefore better to check the ressources on the relevant server and send the result via port 80/443 to the stat-server. The stat-server then displays the stats. The stat-server then can also check if the other server is down if he didn't get a value within a specific time (aggregation/calculation). The nice advantage is that you can add an uptime history quite easily.
This was the issue. @nixcom and @asterisk14 adjust outgoing TCP ports on monitoring server.
@clone1018 and @trexos - solved I believe.
I'll check it later and confirm you guys, thanks for all your time!
That was it. The port was blocked on outgoing. My bad...
Yes this script may not work on some shared webhosts since the outgoing ports will likely be blocked.
Some hosts also block fsockopen as its used in a common Denial of Service script.
If all you want is to ping, monit works and it probably has more features.
I don't know of any monitoring software that requires web server to be installed on slaves if all you want is ping; the only reason slaves would need software is for other data like load, disk usage, etc.
Howsabout some Jquery to flash a green /red row on update?
Threw it on another server so I could try ssh on my LES box.
http://f63.net/stat.php
Works fine, ssh is on 3601 and it is showing it is up.
I'm not sure why my pi is offline, just found a purpose for it and now I can't use it
Also here in my signature, how do you get the Background in? css?
Yeah,
Add:
http://pastebin.com/1R2wrQ5H
in your
and put:
body {
background-image:url('bg.jpg');
background-size: 100%;
}
in your style.css
Now upload a picture and call it bg.jpg. (You can do it without a seperate css file but this was easier for me.)
Here's an updated one that doesn't freeze if the host is down, it also continually checks the host every 6 seconds:
Source: http://paste.kde.org/pde389f82/
Demo: http://tools.io/misc/status.php
What do you mean with freeze?
I refresh the whole page every 5 seconds with HTML
When there is a server down it takes a while to load the page, with his version it will load instantly and then check the servers.
Keep in mind that with the usage of fsockopen() you provide third parties a nice way of bringing your whole server-infrastructure down. All they need to do is massively loading and reloading your script until you flood your servers with requests.
Thanks for the Update, only problem is when i have the one .js file local it dosent works 100% like yours.
I don't understand @Infinity580
@ska This was written for internal use, which is why it's one script total not a whole application.
Äh. i changed this
cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js
to this jquery.min.js
So when you take a closer look you can see the differences.
The File is local available
You'll have to rehost any files that I include if you don't have access to the internet wherever the script is being ran.
I just put them local because the page is loading a bit faster as before
Local file:
http://s7.directupload.net/file/d/3326/wckp2uue_png.htm
Your Script not local:
http://s14.directupload.net/file/d/3326/2wklgqnk_png.htm
You need all the bundled icons too.
I see, but what I've written was directed at those who propagandate the public access to the working script on their servers.
@clone1018 Thanks, fixed.
Not really since its free?
And if you were lucky enough to grab a pingdom account in december you could have gotten that for free awell.. (got 3 accounts, total of 30 checks for free)
The question to be asked is: Do you want to give third parties insights into your infrastructure and why do you trust third parties more than your own set-up?
I don't really see how a company like pingdom would care if your uptime is 10% or 100% really... and a company like pingdom has way more features and are more reliable than any self hosted stuff, atleast in my case.
And by using a third party service you don't need that webserver.
@ska - it's fun to host something like this on your own site, but like @Makkesk8 said I use scalextreme/uptimerobot/pingdom to monitor my site, even though my site is not critical. Do we really want a LEB monitoring another LEB? Sounds crazy!
Using php sockets is extremely slow in this case. It's faster to execute the linux ping program from php and then parse the output.
You don't need a webserver in general to perfom pings. A simple bash-script is sufficient. I'm just saying that relying on third parties must not always be a good solution. Especially if a monitoring can be done easily without much hassle and data provided to third parties.
You think using a LEB for monitoring another LEB is crazy but using third party tools that are designed for business usage for a non-critical LEB is not crazy? That sounds crazy! ;-)