Howdy, Stranger!

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

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

Openstatus installation guide.

Openstatus installation guide.

JackJack Member
edited August 2013 in Tutorials

This is for a Debian Master;

deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
deb http://deb.nickmoeck.com/debian/ stable main

is the content of /etc/apt/sources.list

server {

        listen 80;

        access_log /var/log/nginx/openstatus.access.log;
        error_log /var/log/nginx/openstatus.error.log;

        root /usr/share/openstatus-server/public_html;
        index index.php;

        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
        }
}

is the content of /etc/nginx/sites-enabled/default

apt-get purge apache2* nano /etc/apt/sources.list apt-get install nano apt-get update apt-get install nano nano /etc/apt/sources.list wget -O - http://www.dotdeb.org/dotdeb.gpg | apt-key add - wget -O - http://deb.nickmoeck.com/debian/packages.gpg.key | apt-key add - apt-get update apt-get install openstatus-server apt-get update nano /etc/apt/sources.list apt-get update apt-get install php5-fpm nginx php5-sqlite3 apt-get install php5-fpm nginx php5-sqlite apt-get install php5 apt-get install openstatus-server nano /etc/nginx/sites-enabled/default service nginx restart service php5-fpm restart ifconfig apt-get install openstatus-client nano /etc/openstatus/config.php service openstatus-client restart nano /etc/openstatus/openstatus-client.conf service openstatus-client restart apt-cache policy openstatus-server

-- Done for master

Now;

CentOS Slave;

wget http://pkgs.repoforge.org/python-configobj/python-configobj-4.6.0-1.el5.rf.noarch.rpm wget http://pkgs.repoforge.org/python-simplejson/python-simplejson-2.0.9-1.el5.rf.i386.rpm rpm -i python-configobj-4.6.0-1.el5.rf.noarch.rpm rpm -i python-simplejson-2.0.9-1.el5.rf.i386.rpm mkdir /etc/openstatus/ cd /usr/local/bin wget http://openstatus.nickmoeck.com/export/ecb2b9b83ecc488b5534d7d355b9fe4d7c476280/openstatus-client chmod +x openstatus-client cd /etc/openstatus wget http://openstatus.nickmoeck.com/export/ecb2b9b83ecc488b5534d7d355b9fe4d7c476280/openstatus-client.conf nano open* ifconfig openstatus-client

--

Debian/ubuntu Slave:

mkdir /etc/openstatus/ cd /usr/local/bin wget http://openstatus.nickmoeck.com/export/ecb2b9b83ecc488b5534d7d355b9fe4d7c476280/openstatus-client chmod +x openstatus-client cd /etc/openstatus wget http://openstatus.nickmoeck.com/export/ecb2b9b83ecc488b5534d7d355b9fe4d7c476280/openstatus-client.conf apt-get update -y apt-get install python-configobj -y apt-get install python-simplejson -y openstatus-client cd /etc/openstatus nano * openstatus-client


Post your master's below :)

Tagged:
Thanked by 4yomero Andri Nick ztec
«1

Comments

  • Nice.

    The Original Daniel.

  • PADPAD Member
    edited July 2012

    Write a script to do it for you, duh.

    You get cookie points when you automate stuff.

  • DamianDamian Member

    Will openstatus-client start itself after a reboot?

    I am no longer affiliated with IPXcore.
  • PADPAD Member

    @Damian since I see no chkconfig line I'm going to assume that's a no. He did install it as a service so it does depend whether openstatus-client does that for you, but I know similar software requires you manually add it to startup.

  • NickMNickM Member

    For openstatus-client on Debian/Ubuntu, you should use the openstatus-client package from the repo. It will grab all of the dependencies and set it up to start at boot automatically. You'll just need to edit the /etc/openstatus/openstatus-client.conf file.

    Lead Developer - HostGuard Control Panel

    Thanked by 3TheHackBox PAD tux
  • nunimnunim Member
    edited July 2012

    @PAD said: Write a script to do it for you, duh. You get cookie points when you automate stuff.

    I actually realized this topic is about OpenStatus-Server but I figured having a script to install the client would actually be more useful since you only need to install the server once but do many client installs (especially if you have a bunch of LEBs like me).

    Ask and ye shall receive:

    OpenStatus-Client Install Script http://s5.sonicboxes.com/files/osclient.sh useage: ./osclient.sh (openstatus-server ip)
    Example:
    * wget http://s5.sonicboxes.com/files/osclient.sh
    * chmod 755 osclient.sh
    * ./osclient.sh 167.21.198.21

    SonicGlass 11 Locations- Amsterdam, Atlanta, Denver, Los Angeles, , Milan,
    SonicBoxes.com - VPS Tips, Tricks & Tutorials

  • Sorry for resurrecting an old thread, but is anyone using OpenStatus to monitoring services ?

    I have updated my config to monitor OpenvpnAS with this in the client conf:

    [processes] # What processes do you want to monitor? [[openvpnas]] proc = openvpnas level = critical

    But the running service is never detected to I always get an alert, checking on the client i can see it is running:

    nik 13864 0.0 0.4 1792 596 pts/0 S+ 18:41 0:00 grep openvpnas

    Anyone have any experience with it ?

    Thanks

  • @nikc It is not running. What you see there is that grep is running a search for openvpnas

  • I don't think the process itself is called 'openvpnas,' the frontend is Python, the backend is run of the mill OpenVPN.

    -- BOFH

  • @Night said: It is not running. What you see there is that grep is running a search for openvpnas Doh ....

    Yes, looking again now I see nothing specific, just lots of python running ..

  • Here you go, the process name should be fairly obvious now ;)

    Click this image: http://voile.tomoyo.eu/201210022338.png

    -- BOFH

  • Would appreciate if anyone can help me.

    /usr/bin/openstatus-server -d
    OpenStatus started in debug mode with PID 648 using config file /etc/openstatus/openstatus-server.conf
    Traceback (most recent call last):
    File "/usr/bin/openstatus-server", line 346, in 
    main()
    File "/usr/bin/openstatus-server", line 333, in main
    reactor.listenTCP(TCP_PORT, f, interface=TCP_IP)
    File "/usr/lib/python2.6/dist-packages/twisted/internet/posixbase.py", line 419, in listenTCP
    p.startListening()
    File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 855, in startListening
    raise CannotListenError, (self.interface, self.port, le)
    twisted.internet.error.CannotListenError: Couldn't listen on 0.0.0.0:12999: [Errno 98] Address already in use.

    http://awesomescreenshot.com/0cdxigc9c

    So this means system is receiving info at the same time it is not?

  • did you put 0.0.0.0 in your config file?

    if so, test with a "real" ip.

    http://www.lowendguide.com/ - the guides to administer your lowend vps | Make money writing tutorials
    Free CPanel Shared Hosting Locations: Miami (US) | Rotterdam (NL)
  • @MikHo Same thing with real ip, local ip etc.

    Server is receiving info from the client at the same time it is not receiving anything. Gibberish situation.

  • perhaps stupid question, but is this on debian? installed via the repo ?

    http://www.lowendguide.com/ - the guides to administer your lowend vps | Make money writing tutorials
    Free CPanel Shared Hosting Locations: Miami (US) | Rotterdam (NL)
  • NightNight Member
    edited February 2013

    @NHRoel Something is off with your time. It's 6 hours off. I modified my open status installation to keep count from local server time, not the remote's server time.

  • @Mikho Yes debian.

    @Night both server have exact time

    Thu Feb 14 17:17:16 EST 2013 - Master Thu Feb 14 17:11:49 EST 2013 - client

  • MikHoMikHo Member
    edited February 2013

    what nags me is that you get ip 0.0.0.0 in your debug log, in my head it should say the ip you defined in your config file.

    give me a minute and I'll install the server again (haven't been using this for 6 months or so).

    http://www.lowendguide.com/ - the guides to administer your lowend vps | Make money writing tutorials
    Free CPanel Shared Hosting Locations: Miami (US) | Rotterdam (NL)
  • I changed the ip tried 3 solution and same issue.

  • @NHRoel That 5 minute distance is usually enough to cause Openstatus to say a server is offline, which is why I changed all instances from "data['time']" to "time()" in the /usr/bin/openstatus-server file

    This should be unrelated though, as there shouldn't be a 6 hour time difference. Usually that means a timezone is misconfigured or something. What happens if you remove and readd the server?

    Make sure you aren't running multiple instances of openstatus-server, as that can cause your issue when trying to debug.

  • This is only 1 single install. Both on node and server level.

  • Are you still getting the couldn't listen error when you run it in -d mode on the command line? Check to see if there isn't already an instance running.

    # ps awx | grep openstatus
    # netstat -anp | grep 12999
    

    0.0.0.0 should be valid. That just means to listen on all interfaces.

  • @NHRoel then try using your public IPs in the openstatus-client.conf and also when you add the server in the OpenStatus control panel.

  •  netstat -anp | grep 12999
    tcp        0      0 0.0.0.0:12999           0.0.0.0:*               LISTEN      565/openstatus-serv
    
    ps awx | grep openstatus                                                                                                    565 ?        S      0:00 openstatus-server
      658 pts/0    S+     0:00 grep openstatus
    
  • @NHRoel looks like there's already an openstatus-server running with PID 565 which is why you get the couldn't listen error when you ran it on the command line with -d. Stop it with the init script if you want to run it in debug mode on the command line or restart it with the init script.

  • @t3k9 that takes care of the error. What about servers showing down even though it is up?

  • Check the logs? Try running the server in debug mode and see if it shows anything. You'll need to stop the service before running it in debug mode:

    # service openstatus-server stop
    # /usr/bin/openstatus-server -d
    
  • NHRoelNHRoel Member
    edited February 2013
    Received JSON from removed ip: {u'uptime': {u'load1': 0.02, u'status': 0, u'uptime': u'1 day', u'load15': 0.0, u'load5': 0.040000000000000001}, u'ram': {u'status': 0, u'total': 32014, u'bufcac': 318, u'free': 31782, u'used': 231}, u'transfer': {u'rx': 417, u'rx-status': 0, u'tx': 143, u'tx-status': 0}, u'who': {u'root': 2}, u'ips': [{u'ip': u'removed ip', u'host': u'removed ip'}], u'time': 1360860603, u'disk': {u'single': [{u'fs': u'/dev/mapper/VolGroup-LogVol00', u'mount': u'/', u'avail': 8203800, u'used': 1593120, u'total': 10321208, u'type': u'ext4'}, {u'fs': u'tmpfs', u'mount': u'/dev/shm', u'avail': 16391408, u'used': 0, u'total': 16391408, u'type': u'tmpfs'}, {u'fs': u'/dev/md0', u'mount': u'/boot', u'avail': 66365, u'used': 27654, u'total': 99138, u'type': u'ext4'}, {u'fs': u'/dev/mapper/VolGroup-LogVol01', u'mount': u'/vz', u'avail': 1806621592, u'used': 6666384, u'total': 1910326924, u'type': u'ext4'}], u'total': {u'avail': 1831283165, u'status': 0, u'total': 1937138678, u'used': 8287158}}, u'hostname': u'removed hostname'}
    
    
  • @NHRoel Time reported as 1360860603, and it's not 11:50AM EST? There's your 7 hours

  • @night Thanks for the info. That takes one issue out. So how can I fix that?

    Also is this the reason why node is showing it is down?

  • and here I was installing it again :)

    http://www.lowendguide.com/ - the guides to administer your lowend vps | Make money writing tutorials
    Free CPanel Shared Hosting Locations: Miami (US) | Rotterdam (NL)
  • NightNight Member
    edited February 2013

    @NHRoel It runs a time comparison to what the time currently is. Both scripts seem to use slightly different methods of getting time, which could make up for the error. If you read up to my previous reply you'll see the best way to actually fix the issue, which is relying on the host time.

  • @Night Would you be kind enough to share your edited file? I changed as you have asked and this is what I get, openstatus-server File "/usr/bin/openstatus-server", line 236 roundedtime = int(time() // 60) * 60)

  • You're missing a parenthesis before time()

  • Anyone have any openstatus demo available? I have a funny feeling.

    http://awesomescreenshot.com/0fcxn9qb4

  • Hi everybody! I've just pushed out version 0.6.6 to the repo, which should solve the issues that you see when the time on the clients doesn't match the time on the server. Instead of relying on the timestamp from the client, the server now stores the local timestamp. If you're using the Debian repo, you should be able to just do apt-get update && apt-get upgrade. Otherwise, you can grab the latest openstatus-server file here. Let me know if you experience any other problems :)

    Lead Developer - HostGuard Control Panel

  • Anyone have problems accessing http://openstatus.nickmoeck.com/ ?

    looks like open file descriptor was hit ?

    Oops… Trac detected an internal error: OSError: [Errno 24] Too many open files There was an internal error in Trac. It is recommended that you inform your local Trac administrator and give him all the information he needs to reproduce the issue.

    Centmin Mod Project (ngx_pagespeed + SPDY support)
  • Do the graphs work for anyone? Mine do not. I have also seen some of the other people's status pages, and they do not appear to work there either.

  • tridinebandimtridinebandim Member
    edited April 2013

    apt-get install php5-gd

    should work...

    20GB free space in COPY.com (opens in a new tab)(really...)

  • dclardydclardy Member
    edited May 2013

    That did not help me on this. Any other ideas? I have restructured the theme of it heavily, but it did not work from the beginning on my install.

    http://penn.clardyhost.com

    Edit:

    Got it taken care of. I deleted the cache folder earlier, but I realized it need it after looking at the grapher.php file. Added it back in, and it started working fine.

    Thanks.

  • JackJack Member

    Can I have the theme @dclardy ? haha.

  • taronyutaronyu Member

    Is it possible to specify what port the client is running? I got a vps with a NAT ipv4 and I think it is the reason the server isn't getting any response from my client.

  • nunimnunim Member
    edited May 2013

    @taronyu said: Is it possible to specify what port the client is running? I got a vps with a NAT ipv4 and I think it is the reason the server isn't getting any response from my client.

    Yes.. it's right under where you put the IP in your configuration file.

    /etc/openstatus/openstatus-client.conf
    [server] # What server should we send updates to?
      [[Primary]]
        ip = x.x.x.x
        port = 12999
      [[Secondary]]
        ip = 127.0.0.1
        port = 12998

    SonicGlass 11 Locations- Amsterdam, Atlanta, Denver, Los Angeles, , Milan,
    SonicBoxes.com - VPS Tips, Tricks & Tutorials

  • taronyutaronyu Member

    But that should be the port the server is running on? server and client are on the same NAT ip adress.

  • nunimnunim Member

    @taronyu said: But that should be the port the server is running on?

    Yes it should be the same port...

    SonicGlass 11 Locations- Amsterdam, Atlanta, Denver, Los Angeles, , Milan,
    SonicBoxes.com - VPS Tips, Tricks & Tutorials

  • taronyutaronyu Member

    ohh wel, problem... :P

    thanks anyway.

  • MikHoMikHo Member

    @taronyu Open openstatus-server.conf Find port= and update to the port you like.

    http://www.lowendguide.com/ - the guides to administer your lowend vps | Make money writing tutorials
    Free CPanel Shared Hosting Locations: Miami (US) | Rotterdam (NL)
  • I like the script !!! A lot of thanks.

    VMCP.net on auction -> Participate

Sign In or Register to comment.