Howdy, Stranger!

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


ServerStatus Munzy Edition Email Alerts
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.

ServerStatus Munzy Edition Email Alerts

ServerStatus Munzy Edition

Links:

ServerStatus: https://www.qwdsa.co...tus-rebuild.43/

Github: https://github.com/M...et/ServerStatus

Example: http://uptime.munroenet.com/ &&  https://www.munroenet.com/uptime/

As part of today, 5 Oct. 2014, I have included email alerts to ServerStatus. These email alerts will be sent to you after around ~60 seconds, assuming you are using the default $failafter variable. These are simple plain text emails so they should support all email clients, and can be used in email to text message alerts as well. See Email to Text Alerts here

Up alerts look like:

2014-10-05_09-46-04.png

Down alerts look like:

2014-10-05_09-46-56.png

Also, for those of you whom hate php, imchandave at LET made perl and bash alternatives. You will however still need a webserver to distribute the file to main node.

bash && perl.

Sorry for any grammar or spelling errors, still half asleep this morning.

Mun

p.s. This was fake downtime, so Ramnode had no downtime. 

Thanked by 2Lee trexos
«1

Comments

  • JohnRoeJohnRoe Member
    edited October 2014

    somehow, I got a vps which run vpn. So in order to make this script work, I installed apache on port 8000.. I dont know where is my fault, but I cant make the script detect my server is online.. I can access the server url via browser but the script show my vps is down.

  • MunMun Member

    What is the URL set to in config.php

  • Looks great :) No mysql is nice as well, the only thing I don't like is that every live server needs it's own webserver. Anyway, nice script and thank you very much :)

  • @trexos said:
    Looks great :) No mysql is nice as well, the only thing I don't like is that every live server needs it's own webserver. Anyway, nice script and thank you very much :)

    If you look closeley, you can find that you dont need a webserver ^^

  • MunMun Member
    edited October 2014

    You can do it just via php -S 0.0.0.0:8000 /path/to/uptime.php

  • trexostrexos Member
    edited October 2014

    @cassa said:
    If you look closeley, you can find that you dont need a webserver ^^

    It says Also, for those of you whom hate php, imchandave at LET made perl and bash alternatives. You will however still need a webserver to distribute the file to main node.

    So I understand it like you need a webserver, but no PHP^^

  • MunMun Member

    @trexos said:

    He didn't like PHP, but you can always run php only if you don't want the webserver.

    https://www.pilabs.io/forum/index.php?threads/use-uptime-php-without-apache-nginx-etc.16/

    Thanked by 1trexos
  • JohnRoeJohnRoe Member
    edited October 2014

    @Mun said:
    You can do it just via php -S 0.0.0.0:8000 /path/to/uptime.php

    visited via browser

    what ur serverstatus script show to me(vpn_ny)

    see? even my server online? ur script show it offline.. u also can see server below vpn_ny.. it host uptime_used.php on other port.. also down..

  • MunMun Member

    @psycholyzern said:
    see? even my server online? ur script show it offline.. u also can see server below vpn_ny.. it host uptime_used.php on other port.. also down..

    Can you wget the file from the node hosting server status?

    What do the error logs say?

  • @Mun said:
    What do the error logs say?

    connecting, rety, connecting, retry, ........................
    so, I guess not your script's fault..

  • MunMun Member

    Lol. See if you can ping your server. I have seen a lot of DNS issues lately.

    Also how are you running the script? In screen?

  • @Mun can you add the bandwidth ?

  • @iSky said:
    Mun can you add the bandwidth ?

    @Mun, if you need help with this, I thought I still have a script to do this.

  • MunMun Member

    Please define bandwidth: (total, last minute, right now, last 10 seconds, what?)

  • JohnRoeJohnRoe Member
    edited October 2014

    @Mun said:
    Lol. See if you can ping your server. I have seen a lot of DNS issues lately.

    I can ping it..
    I used mojeda original script before, and no problem with it.
    now Im using uptimerobot, there is still no problem.
    but this problem exists with your script..So I assume your script is the problem...

    But, I cant wget uptime_used.php from the server.. But I can ping it.. even my browser can access the ip:8000

    Also how are you running the script? In screen?

    Im not really understand this question..

  • MunMun Member

    Can you PM the IP of the server at fault?

    Are you running the uptime_used.php via php -s 0.0.0.0:8000?

    Can you ping from the monitoring server to the node?

    You have given me little to go off of to try and help you. I doubt it is a script issue.

  • I installed php on ip:8000

    yes i can ping it..

    I pm'ed you.. and I hope there were no silly mistakes I did resulting in this issue..hahaha

  • This ServerStatus does not use ping to determine status. Instead, it tries to retrieve status information using the URL assigned for each remote site as specified in the config.php.

    The status info is a JSON-formatted data structure containing info such as disk & memory usage, uptime, and load average.

    Try using the URL specified in your config.php for the remote site. Does it return anything? If not, then the problem is on your remote site (the site you are trying to monitor).

    See ya...

    d.c.

  • @mun total bandwidth usage and remaining, can you add it ? :D

  • mikhomikho Member, Host Rep

    @iSky said:
    mun total bandwidth usage and remaining, can you add it ? :D

    How would the script know about remaining?
    You need to read from the Control Panel (like Solus) using the API.

  • @iSky said:
    mun total bandwidth usage and remaining, can you add it ? :D

    Or add something into the config for that node?

  • If you can add current bandwith, or used bandwith this month I'll use it. :)

  • MunMun Member

    Really that is a sucky idea because I would need to rely on third party apps for bandwidth monitoring + uses exec();.

    I think you might be better off running vnstat and echoing the contents into a file on the server.

    Something like: https://cdn.content-network.net/vnstat.txt

  • maybe this one can be your inspiration http://www.jualssh.com/status/
    just in case of bandwidth usage

  • hostnoobhostnoob Member
    edited October 2014

    @Mun said:
    Really that is a sucky idea because I would need to rely on third party apps for bandwidth monitoring + uses exec();.

    I think you might be better off running vnstat and echoing the contents into a file on the server.

    Something like: https://cdn.content-network.net/vnstat.txt

    You can use these files to work out BW usage and current incoming/outgoing BW:

    /sys/class/net/eth0/statistics/rx_bytes
    /sys/class/net/eth0/statistics/tx_bytes

    I think it's venet0 for openvz

  • MunMun Member

    @hostnoob said:
    I think it's venet0 for openvz

    Correct, the problem is that doesn't show current. It is a counter from boot time on how many bytes have been sent.

  • @Mun said:

    Yeah but you can update it every second and currentValue - lastValue = bytes/second

    of course the script won't know when the month started to work out monthly bw usage, unless the user specifies it

  • MunMun Member

    @hostnoob said:
    of course the script won't know when the month started to work out monthly bw usage, unless the user specifies it

    That is the problem, server status is based on a pull design not a daemon design.

  • jarjar Patron Provider, Top Host, Veteran

    Keep up the good work @Mun :)

  • MunMun Member

    JAR :D

Sign In or Register to comment.