Code Monkey home page Code Monkey logo

munin-plugins-gitlab's Introduction

GitLab Plugins for Munin

This is a collection of plugins for monitoring your GitLab instance with Munin.

These plugins are developed for and tested with GitLab versions >= 8.0.0. Maybe some plugins may work with older GitLab instances, but there's no support for occuring bugs or errors.

Setup

  1. Install dependencies depending on your distribution:
  • Ubuntu
    sudo apt-get install python-psycopg2
    
  1. Clone this repository to your GitLab server. Create a new file called gitlab in /etc/munin/plugin-conf.d and copy+paste the following lines:
[gitlab_*]
user git
#env.gitlab_dir /var/opt/gitlab    # optional, defaults to GitLab omnibus package setup directory
 
## using a PostgreSQL database
#env.db_engine postgresql          # optional, defaults to postgres, valid values: postgresql. mysql
#env.db_dsn host=/var/opt/gitlab/postgresql user=gitlab dbname=gitlabhq_production  # optional, defaults to GitLab omnibus database
#env.db_pg_search_path gitlab     # optional, set search_path before executing any query. Useful if not using GitLab omnibus package
  
## using a MySQL database
#env.db_engine mysql
#env.db_dsn host=localhost user=gitlab db=gitlabhq_production
  
[gitlab_redis_*]
user gitlab-redis
#env.redis_socket /var/opt/gitlab/redis/redis.socket  # optional, defaults to GitLab omnibus redis instance
  
[gitlab_total_registry_size]
user registry
  1. Change your directory to /etc/munin/plugins. Create symlinks for each plugin (ln -s) which you want to activate. Please take a look at the plugin specific documentation.

Plugins

Plugin configuration

All plugins will use the default omnibus gitlab setup configuration. You can customize the behaviour with the following parameters:

Further Monitoring

bundled nginx

If you want to monitor the bundled nginx instance you have to enable the status module. Supposed you have no other nginx instance running, create a file /etc/nginx/conf.d/status.conf and add the following lines:

server  {
    listen *:80;
    listen [::]:80;
    server_name localhost;
    location /nginx_status {
        stub_status on;
        access_log off;
        allow 127.0.0.1;
        allow ::1;
        deny all;
    }
}

In /etc/gitlab/gitlab.rb update your configuration:

nginx['custom_nginx_config'] = "include /etc/nginx/conf.d/*.conf;"

After gitlab-ctl reconfigure and gitlab-ctl restart you should be able to use the default nginx plugins for munin to monitor your gitlab nginx instance. You can activate them via:

ln -s /usr/share/munin/plugins/nginx_request /etc/munin/plugins
ln -s /usr/share/munin/plugins/nginx_status /etc/munin/plugins
/etc/init.d/munin-node restart

munin-plugins-gitlab's People

Contributors

matthiaslohr avatar tnir avatar boudekerk avatar ap-wtioit avatar saily avatar

Watchers

James Cloos avatar

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.