{"id":17662762,"url":"https://github.com/naereen/my-munin-plugins","last_synced_at":"2025-03-30T11:41:29.352Z","repository":{"id":94052027,"uuid":"71299731","full_name":"Naereen/My-Munin-plugins","owner":"Naereen","description":":monkey_face: Some tiny plugins for @munin-monitoring :computer:, written to learn how to write them... I was curious! :tada:","archived":false,"fork":false,"pushed_at":"2017-02-27T10:42:18.000Z","size":914,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T13:34:34.271Z","etag":null,"topics":["monitoring","munin","munin-plugins","plugins","script"],"latest_commit_sha":null,"homepage":"http://guide.munin-monitoring.org/en/latest/plugin/writing.html","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Naereen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-18T23:21:22.000Z","updated_at":"2021-02-17T15:13:49.000Z","dependencies_parsed_at":"2023-03-08T08:15:11.497Z","dependency_job_id":null,"html_url":"https://github.com/Naereen/My-Munin-plugins","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FMy-Munin-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FMy-Munin-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FMy-Munin-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FMy-Munin-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Naereen","download_url":"https://codeload.github.com/Naereen/My-Munin-plugins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314127,"owners_count":20757457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["monitoring","munin","munin-plugins","plugins","script"],"created_at":"2024-10-23T18:23:32.901Z","updated_at":"2025-03-30T11:41:29.325Z","avatar_url":"https://github.com/Naereen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My own plugins for [Munin](http://www.munin-monitoring.org/)\n\nThis small repository contains some tiny plugins (written in [Bash](https://www.gnu.org/software/bash/) or [Python](https://www.python.org/)), for the [Munin](http://www.munin-monitoring.org/) monitoring tool.\n\nDespite a [very rich plugin collection](http://gallery.munin-monitoring.org/), I found some that could be missing to someone (well, at least to me), so I decided to write them.\nSee below for a list of the plugins I wrote (tiny, and probably bugged), and how to install them.\n\n----\n\n## How to install them?\n### 1. First clone the repo\nIn a classic Ubuntu or Debian Linux environment, with [Munin](http://www.munin-monitoring.org/) correctly installed with the default folder configuration, the following commands will [git clone](https://help.github.com/articles/cloning-a-repository/) my repository:\n\n```bash\ncd ~/.local/etc/munin/    # A certain directory, you can use some place else\ngit clone https://github.com/Naereen/My-Munin-plugins ./My-Munin-plugins.git/  # Clone my repo\ncd ./My-Munin-plugins.git/  # Go to this directory\n```\n\n### 2. Then [install or activate the plugins](http://munin-monitoring.org/wiki/faq#Q:Howdoyouinstallaplugin) you want\nThen, pick the plugins you like in [this folder](https://github.com/Naereen/My-Munin-plugins/tree/master/), and [install them or activate them](http://guide.munin-monitoring.org/en/latest/plugin/writing.html#activating-the-plugin).\n\nFor instance, if you want to intall the plugin [`number_of_plugins.sh`](https://github.com/Naereen/My-Munin-plugins/tree/master/number_of_plugins.sh), then in the good folder (see step 1) do:\n\n```bash\n# Be sure it is executable\nchmod 755 number_of_plugins.sh  # By default they should all be executable\n# Then symlink it to /etc/munin/plugins/\nsudo ln -s ${PWD}/number_of_plugins.sh /etc/munin/plugins/nb_of_plugins\n```\n\nYou can (and should) then check that the plugin works:\n\n```bash\n$ munin-run nb_of_plugins  # Gives the number of plugin currently activated\nplugins.value 34\nmyplugins.value 5\n```\n\nYou can repeat these two steps for every plugins you want to install.\n\n*Note:* you can also use the provided [`Makefile`](https://github.com/Naereen/My-Munin-plugins/tree/master/Makefile) to install one or all plugins:\n\n```bash\nmake install__tmux  # Ask for sudo password and install tmux.sh to /etc/munin/plugins/tmux\nmake install_all    # Ask for sudo password and install all my plugins to /etc/munin/plugins/\n```\n\n----\n\n## List of plugins\n- [x] Number of open tabs, windows and panes in [tmux](https://tmux.github.io/) ? **Done**, see [`tmux.sh`](https://github.com/Naereen/My-Munin-plugins/tree/master/tmux.sh), it works but works even better if `user` is well configured (see below).\n- [x] Number of open graphical programs and open windows in your window manager ? **Done**, see [`gui_windows.sh`](https://github.com/Naereen/My-Munin-plugins/tree/master/gui_windows.sh), it works *only* if `user` is well configured (see below).\n- [x] Number of open tabs, windows and panes in [Sublime Text 3](https://www.sublimetext.com/3dev) ? It was harder... I created this tiny ST3 plugin ([`number_tabs.py`](https://github.com/Naereen/My-Munin-plugins/tree/master/number_tabs.py), to install in your [`Packages/User` directory](http://docs.sublimetext.info/en/latest/basic_concepts.html#the-user-package)), in order to have a ST3 command `number_tabs`. Then the script [`number_st3_tabs.sh`](https://github.com/Naereen/My-Munin-plugins/tree/master/number_st3_tabs.sh) calls it with `subl --background --command number_tabs` from the command line... FIXME do it better?\n- [x] Number of documents and number of pages printed by my laptop ? **In progress**, see [`nb_printed_documents.sh`](https://github.com/Naereen/My-Munin-plugins/tree/master/nb_printed_documents.sh). FIXME Should already be available from [this list](http://gallery.munin-monitoring.org/printing-index.html)!\n- [ ] Number of channels, users, groups and active users for a [Slack team](https://slack.com/) ? **Done** with [this Python file that accesses the Slack API](get-nb-of-connected-slack-users.py) and [this Bash file that prints the config or values](get-nb-of-connected-slack-users.sh).\n\n### Required configuration\nEdit your `munin-node` configuration file to specify the configuration.\n\nCurrently, [`tmux.sh`](https://github.com/Naereen/My-Munin-plugins/tree/master/tmux.sh) and [`gui_windows.sh`](https://github.com/Naereen/My-Munin-plugins/tree/master/gui_windows.sh) need to be ran from the user `$USER` (ie, you) and not `munin`:\n\n```bash\n[tmux]\nuser lilian   # adapt to your own username\n\n[gui_windows]\nuser lilian   # adapt to your own username\n```\n\n----\n\n## Some screenshots\n### [Tmux](tmux.sh)\n- On the main page:\n![tmux](screenshots/tmux.png)\n- On the page for this plugin (with the legend and information on the plots):\n![tmux_2](screenshots/tmux_2.png)\n\n## [GUI Windows](gui_windows.sh)\n- On the main page:\n![gui_windows](screenshots/gui_windows.png)\n\n### [Munin plugins](number_of_plugins.sh)\n- On the main page:\n![number_of_plugins](screenshots/number_of_plugins.png)\n- On the page for this plugin (with the legend and information on the plots):\n![number_of_plugins_2](screenshots/number_of_plugins_2.png)\n\n### [Slack stats](get-nb-of-connected-slack-users.sh)\n- On the main page:\n![get-nb-of-connected-slack-users](screenshots/get-nb-of-connected-slack-users.png)\n\n----\n\n## Wishlist for future plugins ?\nI would like to be able to use [Munin](http://www.munin-monitoring.org/) to monitor:\n\n- [ ] ~~Number of songs played from morning and number of songs currently in the waiting list, for my music player [GMusicBrowser](http://gmusicbrowser.org) ? ([by @squentin](https://github.com/squentin/gmusicbrowser/))~~ It seems impossible... (I explored the cli API of GMusicBrowser and it seems unachievable)\n- [ ] ~~Number of open tabs and windows in [Firefox](https://www.mozilla.org/en-US/firefox/central/) ?~~ It seems impossible...\n- [ ] Volume of the main sound card? Seems possible. But useless?\n- [ ] Number of USB peripherics connected? Completely useless.\n- [ ] Local [weather](https://github.com/munin-monitoring/contrib/tree/master/plugins/weather/), or temperature of my home?\n- [ ] ... And you, do you have any other idea?\n\n----\n\n## :notebook: References ?\n- For more details on [Munin](http://www.munin-monitoring.org/), see the official website, [www.munin-monitoring.org](http://www.munin-monitoring.org/), and the documentation, [guide.munin-monitoring.org](http://guide.munin-monitoring.org/).\n- A good introductory page is [plugin/writing.html](http://guide.munin-monitoring.org/en/latest/plugin/writing.html) on [the new Munin guide](http://guide.munin-monitoring.org/en/latest/).\n- Fore more details on Munin plugins, see first [this page (wiki/plugins)](http://munin-monitoring.org/wiki/plugins), then [the reference](http://guide.munin-monitoring.org/en/latest/reference/plugin.html), and if needed the older pages [PluginShell](http://munin-monitoring.org/wiki/PluginShell), or [PluginConcise](http://munin-monitoring.org/wiki/PluginConcise) or [HowToWritePlugins](http://munin-monitoring.org/wiki/HowToWritePlugins) on [the Munin wiki](http://munin-monitoring.org/wiki/).\n\n----\n\n## Other [self-quantified projects](http://perso.crans.org/besson/self-quantified.en.html) ?\n- [uLogMe](https://GitHub.com/Naereen/uLogMe/): keep track of your computer activity throughout the day: visualize your active window titles and the number and frequency of keystrokes, in beautiful and responsive HTML timelines.\n- [`selfspy`](https://github.com/gurgeh/selfspy): log everything you do on the computer, for statistics, future reference and all-around fun. I also worked a little bit on [selfspy-vis](https://github.com/Naereen/selfspy-vis), some tools to visualize the data collected by [`selfspy`](https://github.com/gurgeh/selfspy).\n- My minimalist dashboard, generated every hour (with [a `crontab` file](https://help.ubuntu.com/community/CronHowto)), with this bash script [`GenerateStatsMarkdown.sh`](https://bitbucket.org/lbesson/bin/src/master/GenerateStatsMarkdown.sh).\n\n----\n\n## :scroll: License ? [![GitHub license](https://img.shields.io/github/license/Naereen/My-Munin-plugins.svg)](https://github.com/Naereen/My-Munin-plugins/blob/master/LICENSE)\n[MIT Licensed](https://lbesson.mit-license.org/) (file [LICENSE](LICENSE)).\n© [Lilian Besson](https://GitHub.com/Naereen), 2016.\n\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/My-Munin-plugins/graphs/commit-activity)\n[![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://GitHub.com/Naereen/ama)\n[![Analytics](https://ga-beacon.appspot.com/UA-38514290-17/github.com/Naereen/My-Munin-plugins/README.md?pixel)](https://GitHub.com/Naereen/My-Munin-plugins/)\n\n[![ForTheBadge built-with-swag](http://ForTheBadge.com/images/badges/built-with-swag.svg)](https://GitHub.com/Naereen/)\n\n[![ForTheBadge uses-badges](http://ForTheBadge.com/images/badges/uses-badges.svg)](http://ForTheBadge.com)\n[![ForTheBadge uses-git](http://ForTheBadge.com/images/badges/uses-git.svg)](https://GitHub.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaereen%2Fmy-munin-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaereen%2Fmy-munin-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaereen%2Fmy-munin-plugins/lists"}