Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


uptime script with specific needs
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.

uptime script with specific needs

taronyutaronyu Member
edited December 2012 in General

I'm searching for a script that monitors uptime and saves it so I can see it afterwards. If it could send me a email if it was down would be great. Lightweight is always a plus but not necessary.

Now here comes the hard part, I don't want to run apache/lighttpd/nginx or any webserver on my servers because it is a huge security risk. I should work with ping or with ssh. I found many scripts but none ping wich saves the uptime or a monitoring script that works without a web server.

Comments

  • Uptimerobot should be more than enough.

  • I prefer a script on my own vps to be honest ;)

  • @taronyu said: I prefer a script on my own vps to be honest ;)

    So you're wanting to monitor the uptime of a server from the same server that you are monitoring the uptime? I don't think it works like that.

  • NHRoelNHRoel Member
    edited December 2012

    @Corey said: So you're wanting to monitor the uptime of a server from the same server that you are monitoring the uptime? I don't think it works like that.

    $uptime, ping then echo.

  • @NHRoel said: @Corey said: So you're wanting to monitor the uptime of a server from the same server that you are monitoring the uptime? I don't think it works like that.

    $uptime, ping then echo.

    Define uptime?

    Uptime is network and machine related right?

  • @Corey No there will be 1 small vps bought on a totall different network.

  • @taronyu said: @Corey No there will be 1 small vps bought on a totall different network.

    Oh ok.

  • @Corey said: Uptime is network and machine related right?

    Yes. That is why I added ping after uptime. Network and machine, both covered.

  • Problem with all those scripts is that they are trough a web server. And I don't want it because it is a security risk.

    Also I can't find a nice script that saves the uptime and can be public.

  • @taronyu said: Problem with all those scripts is that they are trough a web server. And I don't want it because it is a security risk.

    Also I can't find a nice script that saves the uptime and can be public.

    Why would it be a security risk running a web server? If all you are running is your uptime script what do you have to loose?

  • @Corey said: Why would it be a security risk running a web server? If all you are running is your uptime script what do you have to loose?

    And specially if it is only nginx. You have nothing to loose.

  • dannixdannix Member
    edited December 2012

    @taronyu

    aptitude install uptimed
    
    uprecords
    
  • @Corey @NHRoel Because there are Minecraft servers on them (It isn't only for LEBs) and it is easy to upload a shell trough a plugin in it.

  • @taronyu said: @Corey @NHRoel Because there are Minecraft servers on them (It isn't only for LEBs) and it is easy to upload a shell trough a plugin in it.

    You got me lost.

  • python -m SimpleHTTPServer
    
  • @taronyu said: Also I can't find a nice script that saves the uptime and can be public.

    If you're not going to serve it via http, how is it going to be made public?

  • I can code it :)

  • @darknessends said: I can code it :)

    Wow. Same question: how it is going to be made public?

  • Here is my idea of it.

    Connection to the servers that has to be monitored are going trough ssh and are written in a MySQL DB. Afterwards a php page can read the details from the DB. Ofcourse the main server can use a webserver. As long as the servers that are being monitored don't need it.

  • in such case connect from the (client)servers to the main server and submit the status there

  • joepie91joepie91 Member, Patron Provider

    @Corey said: Why would it be a security risk running a web server? If all you are running is your uptime script what do you have to loose?

    Uhm... because a security issue in the webserver you're using may surface?

  • @joepie91 said: Uhm... because a security issue in the webserver you're using may surface?

    On that same note, a security issue in whatever script he is running that has to connect to the outside world in some way may surface.

  • sleddogsleddog Member
    edited December 2012

    @joepie91 said: Uhm... because a security issue in the webserver you're using may surface?

    Perfectly true. We should all stop serving web pages.Doing so poses a security risk.

  • @taronyu install collectd to gather/send whatever stats you need to a master running collectd in server mode. lightweight and you can expand what you monitor later if you need to. pick an rrdtool graph viewer to see what you need. recent versions can do alerts.

  • Nothing wrong with avoiding webservers on machines that don't actually need it.

    You can just use Uptimerobot's API to grab stats and append a text file really. Do it all on a 32mb VPS and serve it from there. An hour worth of Google is all you need.

  • I'll throw a suggestion out there: Uptime by fzaninotto

    I have this deployed on AppFog and it's been running like a charm for a few days now. Having the uptime monitor on AppFog is super nice because it's A) not on any of my nodes, B) you can deploy to AWS, Rackspace, and HP's Openstack at the same time, and C) it's free.99!

    It was a little bit of a hassle to setup (I had to setup a MongoLab account myself because AppFog was still using Mongo 1.8 and uptime requires 2.1+) but other than that, I haven't had any issues.

    Unfortunately, it's not a very good public script because anyone who has access can add/delete monitors :( Another thing is that since MongoLab's free database limit is 512mb and depending on how many monitors you have/how often you ping, you might hit that limit sooner than you'd like. For example, I'm already up to 16mb and I've only had the thing running for 4 days with only one monitor that checks every 10s.

  • I wanted to try to have the ping server and everything on my own server. However I found out about the api from Uptimerobot and decided that should also do the trick.

    http://server.taronyu.com/uptime/

    Having my own page was pretty much a must, But with the api that was possible :)

Sign In or Register to comment.