Howdy, Stranger!

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


OpenStatus v .6
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.

OpenStatus v .6

clarity_64clarity_64 Member
edited January 2012 in General

Does anyone have this working on a box yet? I am getting no connection from any of my boxes now that I have updated.

Comments

  • Hi, I haven't heard any other reports of issues with version 0.6.x. Are you using 0.6.x on both the clients and the server? Also, if you're on Debian, did you do apt-get update && apt-get upgrade? When you did so, you were probably asked if you wanted to keep your current config file or use the config file from the package - if you chose to use the one from the package, you'll need to edit the config file to point to your server.

  • I was not getting updates at all. So I reinstalled the server with the new packages. It keeps throwing a JSON error.

  • This is the error from the server trying to receive info from the local client.

    2012-01-24 02:13:09,233 ERROR JSON error from 127.0.0.1

  • NickMNickM Member
    edited January 2012

    Can you please stop openstatus-server and client, and then start them in debug mode? /usr/bin/openstatus-server -d and /usr/bin/openstatus-client -d

  • Server.log

    2012-01-24 02:10:08,965 INFO OpenStatus started with pid 15765 using config file /etc/openstatus/openstatus-server.conf
    2012-01-24 02:13:08,125 ERROR JSON error from 127.0.0.1
    2012-01-24 02:13:09,233 ERROR JSON error from 127.0.0.1

    Client.log

    2012-01-24 02:10:16,167 INFO Started with PID 15797
    2012-01-24 02:10:16,169 INFO Not monitoring any processes
    2012-01-24 02:10:16,170 INFO Not monitoring any commands
    2012-01-24 02:10:16,298 WARNING Could not connect to server 127.0.0.1:12998: Connection refused
    2012-01-24 02:11:16,220 WARNING Could not connect to server 127.0.0.1:12998: Connection refused
    2012-01-24 02:12:16,216 WARNING Could not connect to server 127.0.0.1:12998: Connection refused
    2012-01-24 02:12:42,537 INFO Started with PID 15865
    2012-01-24 02:12:42,543 INFO Not monitoring any processes
    2012-01-24 02:12:42,543 INFO Not monitoring any commands

    Client.conf

    [server] # What server should we send updates to?
      [[Primary]]
        ip = 127.0.0.1
        port = 12999
    #  [[Secondary]]
    #    ip = 127.0.0.1
    #    port = 12998
    
    [misc] # Miscellaneous options
    interval = 60 # How often to update, in seconds
    
    [load]
    warning = 1
    critical = 2
    
    [memory] # Warn / critical alert when memory used is above...
    warning = 128
    critical = 192
    
    [disk] # Warn / critical alert when disk usage is above %...
    warning = 80
    critical = 95
    
    [transfer]
    interface = venet0 # What interface should we send traffic info for?
    rx-warning = 1048576 # 1MB/s incoming traffic
    rx-critical = 2097152 # 2MB/s
    tx-warning = 1048576 # 1MB/s outgoing traffic
    tx-critical = 2097152 # 2MB/s
    
    # The next two sections are optional. Uncomment and edit to suit your needs
    #
    #[processes] # What processes do you want to monitor?
    #  [[nginx]]
    #    proc = nginx
    #    level = critical
    #
    #  [[PHP]]
    #    proc = php-fpm
    #    level = critical
    #
    #[commands] # Custom commands to monitor the output of
    #  [[root logged in]]
    #    command = w -hs
    #    type = notstring
    #    string = root
    #    level = warning

    Server.conf

    [server]
    listen_ip = 0.0.0.0 # IP address to listen on (0.0.0.0 for all IPs)
    port = 12999 # Port to listen on
    email_from = [email protected] # Email address for the From: header of alert emails.
    
    [warning]
    type = email # Type of alerting to use. Options: "email", "net", "command" - see Alert Types section below for more info
    address = [email protected] # Email address to send alerts to (required if using type = email)
    #ip = 127.0.0.1 # IP address to send alerts to if using type = net
    #port = 12998 # Port to send alerts to if using type = net
    #command = /bin/true # Command to run on alert if type = command.
    #sendbody = false # If type = command, set to false to disable appending the alert message to the end of the command, true to append it. Defaults to false.
    
    [critical]
    type = email # Type of alerting to use. Options: "email", "net", "command"
    address = [email protected] # Email address to send alerts to (required if using type = email)
    #ip = 127.0.0.1 # IP address to send alerts to if using type = net
    #port = 12998 # Port to send alert to if using type = net
    #command = /bin/true # Command to run on alert if type = command.
    #sendbody = false # If type = command, set to false to disable appending the alert message to the end of the command, true to append it. Defaults to false.
    
  • Thanks. Stop the client with service openstatus-client stop then restart it in debug mode: /usr/bin/openstatus-client -d

    That should print out the JSON that's being sent.

  • Alright. I think that I may have figured this out. There seems to be an error when you use the hostname as the IP. This used to work just fine. Did you remove that functionality?

  • You mean entering the hostname instead of the IP when adding clients in the web interface? I didn't change anything with regards to that. It was never intended to work with a hostname instead of IP there - if it did, it was purely coincidental.

  • Well, it used to work when I entered the hostname. Either way, it seems to be working when I use the IP now. Thanks for the help with this. I have another question though.

    Can you tell me what I can do about this error? I never get any emails from the box, but it appears that it is attempting to send them.

    Traceback (most recent call last):
      File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 84, in callWithLogger
        return callWithContext({"system": lp}, func, *args, **kw)
      File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 69, in callWithContext
        return context.call({ILogContext: newCtx}, func, *args, **kw)
      File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 59, in callWithContext
        return self.currentContext().callWithContext(ctx, func, *args, **kw)
      File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 37, in callWithContext
        return func(*args,**kw)
    ---  ---
      File "/usr/lib/python2.6/dist-packages/twisted/internet/selectreactor.py", line 146, in _doReadOrWrite
        why = getattr(selectable, method)()
      File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 460, in doRead
        return self.protocol.dataReceived(data)
      File "/usr/bin/openstatus-server", line 16, in dataReceived
        processData(data, self.transport.getPeer())
      File "/usr/bin/openstatus-server", line 321, in processData
        checkServers()
      File "/usr/bin/openstatus-server", line 172, in checkServers
        alert(row['hostname'], '0.0.0.0', 'Server Status', 'Critical', 'Down', True)
      File "/usr/bin/openstatus-server", line 147, in alert
        sendAlert(level, title, message)
      File "/usr/bin/openstatus-server", line 112, in sendAlert
        s.sendmail(sender, [receiver], msg)
      File "/usr/lib/python2.6/smtplib.py", line 698, in sendmail
        raise SMTPSenderRefused(code, resp, from_addr)
    smtplib.SMTPSenderRefused: (451, '4.3.0 Temporary system failure. Please try again later.', '[email protected]')
    
  • Looks like a problem with your SMTP server. SMTPSenderRefused means that your SMTP server doesn't allow you to send mails with the sender name that you've specified. Check your SMTP server's settings and log files.

  • Thanks Nick. It seems like I have gotten it all squared away now.

  • Good to hear, @dclardy! I know that I have some work to do on OpenStatus to make issues like this easier to prevent/find/solve. Do mind sharing what the issue with the emails was so that I can add it to the FAQ?

  • I had send mail and Exim4 running at the same time. Complete user error!

  • Weird... I see my CentOS VPS online, but it keeps on sending/displaying me its down.

    I didn't updated the conf though when i received the update. Dunno if it's that causing the prob.

  • Did you update the server section? Did you a hostname like me?

  • KuJoeKuJoe Member, Host Rep

    Any chance of removing the python-setproctitle requirement? It doesn't appear to be critical to the application but causes an error on CentOS 5.7 and cannot be installed on Debian 5 with apt-get because of it.

  • @LivingSoul, are you still having problems? Double check your configuration, and if you're still experiencing issues, please post your client.conf file and any relevant info from the log files.

    @KuJoe: setproctitle shouldn't be causing any issues, it should continue gracefully without it. What version of Python do you have installed, and what's the error message? For Debian 5, make sure you're using the oldstable OpenStatus repo, and not stable.

  • KuJoeKuJoe Member, Host Rep

    @NickM, thanks for the info. The error is just "setproctitle module not loaded" but in CentOS it doesn't run as a service so it generates and e-mail when I run a cronjob for it (and I don't want to set MAILTO="" or else I might miss real errors). Just a thought though. ;)

  • @KuJoe, ah, yes, that's purely an informational message It should probably be a debug message, instead of a warning. I've made the change in the git repo, so you should be able to grab the new file from there. Might be quicker for you to just change logger.warning to logger.debug on the line that generates that message, since that's all I've changed.

  • KuJoeKuJoe Member, Host Rep

    Gotcha! Thanks. :)

  • @NickM thanks also, I had wondered that on Lenny but just moved to testing on Squeeze boxes instead :)

  • KuJoeKuJoe Member, Host Rep

    Oh, and before I forget, any way you can set it to use a lock file like SCRD? This way you won't be able to have it running multiple times on the same server? It's not critical but sometimes there's a timing issue with my cronjob kicking off another instance. Just a suggestion. :)

  • @KuJoe, sure, I'll make sure that makes it into the next release. :D

  • @dclardy said: Did you update the server section? Did you a hostname like me?

    Yes I did, but I didn't update the conf.. Hostname?

    @NickM said: @LivingSoul, are you still having problems? Double check your configuration, and if you're still experiencing issues, please post your client.conf file and any relevant info from the log files.

    Yes I am.. My conf is just fine I guess (unless the CentOS version is updated already?)

    [server] # What server should we send updates to?
    ip = 122.52.x.x
    port = 12999
    
    [misc] # Miscellaneous options
    interval = 60 # How often to update, in seconds
    
    [load]
    warning = 2
    critical = 3
    
    [memory] # Warn / critical alert when memory used is above...
    warning = 128
    critical = 200
    
    [disk] # Warn / critical alert when disk usage is above %...
    warning = 80
    critical = 95
    
    # The next two sections are optional.  Uncomment and edit to suit your needs
    
    [processes] # What processes do you want to monitor?
       [[openssh]]
         proc = sshd
         level = critical
    
       [[atheme]]
         proc = atheme-services
         level = critical
    
       [[openvpn]]
         proc = openvpn
         level = critical
    #  [[nginx]]
    #    proc = nginx
    #    level = critical
    
    #[commands] # Custom commands to monitor the output of
    #  [[root ~ files]]
    #    command = ls /root | wc -l
    #    type = integer
    #    warning = 10
    #    critical = 20
    #  [[root logged in]]
    #    command = w -hs
    #    type = notstring
    #    string = root
    #    level = warning
    
    
    Not monitoring any commands
    JSON sent: {"uptime": {"load1": 0.11, "load15": 0.51000000000000001, "uptime": "15 days", "status": 0, "load5": 0.17000000000000001}, "who": {"root": 1}, "transfer": {"rx-status": 0, "rx": 0, "tx-status": 0, "tx": 6}, "hostname": "mai.marcroger.com", "ram": {"total": 8388607, "status": 0, "used": 105, "bufcac": 54, "free": 8388502}, "ips": [{"ip": "10.1.0.1", "host": "10.1.0.1"}, {"ip": "10.2.0.1", "host": "10.2.0.1"}, {"ip": "10.4.0.1", "host": "10.4.0.1"}, {"ip": "10.2.0.1", "host": "10.2.0.1"}, {"ip": "209.141.x.x", "host": "mai.marcroger.com"}, {"ip": "172.16.246.180", "host": "172.16.x.x"}], "time": 1328113694, "disk": {"single": [{"fs": "/dev/simfs", "mount": "/", "avail": 29369928, "used": 2087352, "total": 31457280, "type": "reiserfs"}, {"fs": "none", "mount": "/dev", "avail": 524284, "used": 4, "total": 524288, "type": "tmpfs"}], "total": {"avail": 29894212, "total": 31981568, "used": 2087356, "status": 0}}, "procs": {"openssh": {"status": 0, "name": "openssh"}, "atheme": {"status": 0, "name": "atheme"}, "mysql": {"status": 0, "name": "mysql"}, "openvpn": {"status": 0, "name": "openvpn"}}}
    
  • people are still running lenny?

  • @justinb said: people are still running lenny?

    It seems...

    Well, tbh, 2 of my 123systems boxes still have it, because their Debian 6 templates are a little bit broken (or their tools outdated) and you need to workaround some stuff.

Sign In or Register to comment.