Coder Social home page Coder Social logo

munin-uwsgi-stats's Introduction

munin-uwsgi-stats

Detailed uwsgi stats plugin for munin. In order to get the stats it uses both the uwsgi stats server and the operating system's process list (for stuff that's not available through the stats server, or wherever the stats server sucks).

I don't look uwsgi_rss/psutil/uwsgi's master... and tcp socket just uds/af_unix/file socket

Installation

pip install psutil
wget -O /usr/share/munin/plugins/uwsgi_  https://github.com/el-dge/munin-uwsgi-stats/raw/master/uwsgi_
chmod 755 /usr/share/munin/plugins/uwsgi_
ln -s /usr/share/munin/plugins/uwsgi_ uwsgi_avg_rt
ln -s /usr/share/munin/plugins/uwsgi_ uwsgi_exceptions
ln -s /usr/share/munin/plugins/uwsgi_ uwsgi_listen_queue
ln -s /usr/share/munin/plugins/uwsgi_ uwsgi_listen_queue_errors
ln -s /usr/share/munin/plugins/uwsgi_ uwsgi_requests
ln -s /usr/share/munin/plugins/uwsgi_ uwsgi_tx

Configuration

  1. add the stats server to your uWSGI config and restart uWSGI (for example, use 127.0.0.1:4999; try "nc 127.0.0.1 4999" to see if there's any JSON output).

  2. edit /etc/munin/plugin-conf.d/munin-node:

    [uwsgi_*]
    user root
    env.port 4999
    env.name My_uwsgi
    

    The port can be either a TCP port or the filename to a unix domain socket. The uwsgi server must run on localhost; if the specified port is a TCP port, the host is assumed to be 127.0.0.1.

    If you are monitoring more than one uwsgi applications you can specify many ports and names, like this:

    [uwsgi_*]
    user root
    env.port 4999 4998 4997
    env.name app1 app2 app3
    
  3. If systemd and file StatsServer.sock into /home: Modify ProtectHome to read-only in munin-mode.service

License

Modified BSD - see file LICENSE for details

munin-uwsgi-stats's People

Contributors

el-dge avatar j0nes2k avatar lambdaq avatar mkubenka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

munin-uwsgi-stats's Issues

ln conf

Hello!

I was expecting the documentation (readme) to say something about ln -s like this

ln -s /usr/share/munin/plugins/uwsgi_ /etc/munin/plugins/uwsgi_

Then I'm not sure if I should link with /etc/munin/plugins/uwsgi_, /etc/munin/plugins/uwsgi_rss or /etc/munin/plugins/uwsgi_requests, or maybe both?

Error getting rss data

Hi,

I tried to use this as uwsgi_rss to get rss data, but I get:

2016/03/07-11:20:42 [9349] Error output from uwsgi_rss:
2016/03/07-11:20:42 [9349]      Traceback (most recent call last):
2016/03/07-11:20:42 [9349]        File "/etc/munin/plugins/uwsgi_rss", line 124, in <module>
2016/03/07-11:20:42 [9349]          get_uwsgi_processes(apps)
2016/03/07-11:20:42 [9349]        File "/etc/munin/plugins/uwsgi_rss", line 85, in get_uwsgi_processes
2016/03/07-11:20:42 [9349]          if p.cmdline[0] == 'uWSGI master':
2016/03/07-11:20:42 [9349]      TypeError: 'instancemethod' object is unsubscriptable
2016/03/07-11:20:42 [9349] Service 'uwsgi_rss' exited with status 1/0.

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.