Coder Social home page Coder Social logo

supervisord-monitor's Introduction

Supervisord Multi Server Monitoring Tool

Screenshot

Features

  • Monitor unlimited supervisord servers and processes
  • Start/Stop/Restart process
  • Read stderr log
  • Start new Redmine ticket when stderr occurs
  • Sound alert when stderr occurs
  • Mute sound alerts (after some time auto resume)
  • Monitor process uptime status

Install

1.Clone supervisord-monitor to your vhost/webroot:

git clone https://github.com/mlazarov/supervisord-monitor.git

2.Copy application/config/supervisor.php.example to application/config/supervisor.php

cp supervisord-monitor/application/config/supervisor.php.example supervisord-monitor/application/config/supervisor.php

3.Enable/Uncomment inet_http_server (found in supervisord.conf) for all your supervisord servers.

[inet_http_server]
port=*:9001
username="yourusername"
password="yourpass"

Do not forget to restart supervisord service after changing supervisord.conf

4.Edit supervisord-monitor configuration file and add all your supervisord servers

vim application/config/supervisor.php

5.Configure your web server to point one of your vhosts to 'public_html' directory. 6.Open web browser and enter your vhost url.

Redmine integration

1.Open configuration file:

vim application/config/supervisor.php

2.Change this lines with your redmine url and auto assigne id:

// Path to Redmine new issue url
$config['redmine_url'] = 'http://redmine.url/path_to_new_issue_url';
// Default Redmine assigne ID
$config['redmine_assigne_id'] = '69';

Troubleshooting

Did not receive a '200 OK' response from remote server.

Having this messages in most cases means that Supervisord Monitoring tools does not have direct network access to the Supervisord RPC2 http interface. Check your firewall and network conectivity.


Did not receive a '200 OK' response from remote server. (HTTP/1.0 401 Unauthorized)

Having 401 Unauthorized means that you have connection between Supervisord Monitoring tool and Supervisord but the username or password are wrong.


UNKNOWN_METHOD

Having this message means that your supervisord service doesn't have rpc interface enabled (only for v3+ of Supervisord). To enable the rpc interface add this lines to the configuration file:

From the Supervisord Docs

In the sample config file, there is a section which is named [rpcinterface:supervisor]. By default it looks like the following:

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

The [rpcinterface:supervisor] section must remain in the configuration for the standard setup of supervisor to work properly. If you don’t want supervisor to do anything it doesn’t already do out of the box, this is all you need to know about this type of section.

For more information go to the offitial Supervisord Configuration Docs: http://supervisord.org/configuration.html#rpcinterface-x-section-settings


The requested URL /control/ ... was not found on this server.

If you are getting this error on every action (stop, start, restart etc) most probably your web server isn't respecting the .htaccess file found in public_html directory. To test this you can add AllowOverride All config to the httpd.conf (if you are using Apache) or to add the rules from the .htaccess file to the httpd.conf file.

Thanks to

Who uses Supervisord Monitor?

EasyWpress - wordpress hosting company

If you've used Supervisord Monitor Tool send me email to [email protected] to add your project/company to this list.

License

MIT License

Copyright (C) 2013 Martin Lazarov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

supervisord-monitor's People

Contributors

johncongdon avatar mlazarov avatar rk295 avatar s-chizhik avatar szekeresa avatar tiagogouvea avatar yozaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

supervisord-monitor's Issues

The requested URL /control* not found

Hi there - First off, let me just say that I absolutely love this tool. It's excellent.

I can view my supervisor nodes, and they show up in the dash. I can see their uptime and their status, but when I try to control a node by starting/stopping it, I get a 404.

Apache logs:
127.0.0.1 - - [19/Aug/2014:11:13:59 -0700] "GET /control/stop/dev1/fire HTTP/1.1" 404 529

Not Found
The requested URL /control/stop/dev1/fire was not found on this server.

The same 404 is thrown when I try to "clear" the status/alert.

127.0.0.1 - - [19/Aug/2014:11:15:48 -0700] "GET /control/clear/dev1/fire HTTP/1.1" 404 530

I know the supervisor.php is configured correctly and the auth is accepted on the host side because I see the list of supervisor processes and their status/uptime.

Any help would be much appreciated. Thanks!

the pages status is not ok

@mlazarov
when the supervisord 9100 auth is enable.
i use the link in supervisord-monitor go to supervisord,the status is no ok.
need in the browser's address bar Re-enter the URL, the page can ok.
see the flow.

1111111

333333333

nginx

Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

All actions are not executed

I,

the frontpage works very well, but everytime I issue a command it gives-me an error:
Ex:
The requested URL /control/stop/mirror23-obb/lsyncd-obbs:lsyncd-obbs-1357 was not found on this server.

The site is being called from a proxy_pass apache rule on another server, could that be it?

Increase email alerts

Could you add a new feature?:pray: That is, when the process fails, an email reminder is initiated, not just an audible alarm. Because many times the monitoring platform may be placed on the server.

some php syntax errors

hi, dou you know about these errors?

A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257

A PHP Error was encountered
Severity: Warning
Message: Illegal string offset 'group'
Filename: views/welcome.php

Line Number: 90
A PHP Error was encountered
Severity: Warning
Message: Illegal string offset 'name'
Filename: views/welcome.php
Line Number: 90

A PHP Error was encountered
Severity: Warning
Message: Illegal string offset 'name'
Filename: views/welcome.php
Line Number: 91

Running it from webroot subfolder

Hi,
I have a management server (runs nginx) where I keep a lot of web-based tools, each in its own webroot subfolder, that I use to manage servers. I added supervisord-monitor there to its own subfolder, and it runs but it looks really ugly as if no css is loaded etc. Any chance of getting it to work there?
screenshot 2018-03-12 15 45 51

BR,
G.

can supervisord-monitor monitoring machine as a group?

can supervisord-monitor monitoring machines as a group?
ie :
in supervisord-monitor pages have groups, can use the groups to start or stop the processes in groups onces , now is ones can start or stop processes as one server .when have many machines ,this not accepts.

Routing problem for numeric process_name

We often use more than one process of supervisord program and we have supervisor configured so that process_name=%(process_num)02d (see supervisord docs)

This setup causes that button links for starting, stopping and restarting single process are for example:
https://superv-monitor.com/control/stop/10/email_process:01 and it seems that every link which ends with number after : is evaluated by router as a base url and welcome.php is rendered without any action.

This works fine: https://superv-monitor.com/control/stop/10/email_process:p01

supervisor_twiddler support

Can I use supervisor_twiddler plugin in this awesome dashboard?

If no, it will be nice if you can add support in this plugin to enable adding and removing processes from the servers.

Web server configuration

Hello,
Can you provide an example on how to configure the web server with apache as stated in point 5?
Best regards,
João

compatibility with php 7.1 ? xmlreader error

Hrm, so I did solve this problem by installing

sudo apt-get install php7.0-xml

but previously I did have sudo apt-get install php7.1-xml and it was giving me an error that xmlreader extension was not installed. I am running php 7.1

odd that the 7.0-xml works but not the 7.1-xml

this is kind of a problem because php7.0-xml gets removed if I run autoremove

Could you provide a ngnix config demo

Excuse my newbie. I've use this monitor under the ngnix config.
`server {
listen 80;
server_name supervisord.add.net;
root /home/q/server/supervisord-monitor/public_html;
index index.php;

location = /ENV {
    allow 127.0.0.1;
    deny all;
}

location ~* \.php$ {
    include fastcgi.conf;
    include include/supervisord.add.net/env.conf;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
}

}`

But, when I choose to stop/start a progress. The got a ngnix error code : 404
Could you please provide a ngnix config file demo for you project ? THANKS

Tracking workload

Hello,
Is there a way to also track workloads? Some workloads create exceptions but its very hard to stop the specific worker that is processing that workload. Any ideas how to manage this?
Thanks a lot!

[Feature] Authentication to supervisord monitor

Hey @mlazarov,

You know, I actually have all my supervisord hosts configured with an authentication on monitor (a basic auth prompted on http connection) :

[inet_http_server]
port=0.0.0.0:9001
username=foo
password=bar

My question is : Is there a way to keep my authentication with supervisord-monitor ?

Thanks.

Cheers

Invalid XML form

Hi! I'm trying to run your app and I'm getting this error:

The XML data received was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further.

I turned on debug mode and this is what I've got:

ERROR - 2017-07-14 14:04:39 --> Severity: Notice --> Resource ID#920 used as offset, casting to integer (920) /var/www/html/supervisord-monitor/system/libraries/Xmlrpc.php 1094
ERROR - 2017-07-14 14:04:39 --> Severity: Notice --> Resource ID#920 used as offset, casting to integer (920) /var/www/html/supervisord-monitor/system/libraries/Xmlrpc.php 950
ERROR - 2017-07-14 14:04:39 --> Severity: Notice --> Array to string conversion /var/www/html/supervisord-monitor/application/views/welcome.php 75
ERROR - 2017-07-14 14:04:39 --> Severity: Warning --> Illegal string offset 'group' /var/www/html/supervisord-monitor/application/views/welcome.php 91
ERROR - 2017-07-14 14:04:39 --> Severity: Warning --> Illegal string offset 'name' /var/www/html/supervisord-monitor/application/views/welcome.php 91
ERROR - 2017-07-14 14:04:39 --> Severity: Warning --> Illegal string offset 'name' /var/www/html/supervisord-monitor/application/views/welcome.php 92
DEBUG - 2017-07-14 14:04:39 --> Xmlrpc class already loaded. Second attempt ignored.

Do you what can cause this error?

Use Double Quotes Instead of Single Quotes

In order for my config/install to stop throwing errors in apache2 and to work, I had to use double-quotes for 'username' => "redactedinfo",
'password' => "redactedinfo"

Just a heads up.

XML-RPC and Ubuntu

Hello @mlazarov,

I'm tried to use your project on our Ubuntu server, but after the configuration, I'm noticed an error message:

The XML data received was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further.

php5-xmlrcp package is installed. I searched the fix for this, but I not found. :(

Any idea?

Thanks for advance,
@kistasi
@allmyles Ltd.

RedMine setup | Can't seem to find out how it works

Hi,

Is there anyone can help to setup redmine please? I have setup vhost and i can see the dashboard but 401 unauthorized. Attached an image for you to see.

I didn't get what is explained here;
Redmine integration

I didn't get what is explained here;
Redmine integration

1.Open configuration file:

vim application/config/supervisor.php
2.Change this lines with your redmine url and auto assigne id:

Can you explain a little bit about this?
// Path to Redmine new issue url
$config['redmine_url'] = 'http://redmine.url/path_to_new_issue_url';
// Default Redmine assigne ID
$config['redmine_assigne_id'] = '69';

Do I have to install any plugins?

Dashboard Screenshot

nginx error 500

I have nginx config with:
server{
server_name 10.21.200.75;
listen 9011;
root /data/release/server/infras/supervisord-monitor/public_html/;
index index.php;

access_log /data/release/server/infras/supervisord-monitor/public_html/access.log;
error_log  /data/release/server/infras/supervisord-monitor/public_html/error.log;

location / {
    try_files $uri $uri/ /index.php;
}

location ~* \.php$ {
    include fastcgi.conf;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
}

}

and supervisord-monitor.php with:

// Dashboard columns. 2 or 3
config['supervisor_cols'] = 2;

// Refresh Dashboard every x seconds. 0 to disable
config['refresh'] = 10;

// Enable or disable Alarm Sound
config['enable_alarm'] = true;

// Show hostname after server name
config['show_host'] = true;

config['supervisor_servers'] = array(
'server01' => array(
'url' => '10.21.200.75',
'port' => '9010',
'username' => 'user',
'password' => '123'
),
);

// Set timeout connecting to remote supervisord RPC2 interface
;config['timeout'] = 3;

// Path to Redmine new issue url
$config['redmine_url'] = 'http://redmine.url/path_to_new_issue_url';

// Default Redmine assigne ID
$config['redmine_assigne_id'] = '69';

However, when I started the nginx service and go to the 10.21.200.75:9011, it returned error 500.
Could you help me resolve this problem?
Thx~

nginx or httpd setup

Hi! I'm having trouble with nginx setup.

nginx: [emerg] open() "/etc/nginx/include/supervisord.add.net/env.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:50

Can you provide how-to setup nginx or httpd properly to access the monitor site?

thanks!

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/super/public_html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    try_files $uri $uri/ /index.php;
    }

location ~* .php$ {
include fastcgi.conf;
include include/supervisord.add.net/env.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
}

}

What's wrong with the index.php file

When I open the browser I only get the warning:

Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

and here is the nginx congfig:

server
{
listen 9000;
server_name my_host;
index index.php index.html index.htm default.php default.htm default.html;
root /home/supervisord-monitor/public_html;
location / {
# Check if a file or directory index file exists, else route it to index.php.
try_files $uri $uri/ /index.php;
}

NO_FILE error

no_file_error

According to RPC docs, NO_FILE error occurs due to permission issues. However in my case, both supervisord log and process logs are owned by root and have 644 permission, so the nginx or rpc should be able to read it.

Tagged Release

Thanks for this great tool!

Could you please make a tagged release - would like to be able to pull down a stable version of this package for deployment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.