├── .github └── FUNDING.yml ├── .gitmodules ├── LICENSE ├── Makefile ├── README.md ├── VERSION ├── docs ├── Makefile ├── README.md ├── genscreenshotpage.sh ├── linuxfr │ ├── Depeche-Linuxfr.org.md │ ├── RPi-Monitor_1ColumnStatusPage.png │ ├── RPi-Monitor_3ColumnsStatusPage.png │ ├── RPi-Monitor_HawkeyeSelfie.png │ ├── RPi-Monitor_ShellInABoxAddOn.png │ ├── RPi-Monitor_SmartphoneStatusPage.png │ └── RPi-Monitor_StatisticsPage.png ├── source │ ├── 01_features.rst │ ├── 02_screenshots.rst │ ├── 10_index.rst │ ├── 11_installation.rst │ ├── 12_custom_installation.rst │ ├── 13_execution.rst │ ├── 14_faq.rst │ ├── 20_index.rst │ ├── 21_daemon.rst │ ├── 22_extraction.rst │ ├── 23_configuration_helper.rst │ ├── 24_web.rst │ ├── 25_addons.rst │ ├── 26_alert.rst │ ├── 27_configuration_templates.rst │ ├── 30_index.rst │ ├── 31_configuration_examples.rst │ ├── 32_sensors.rst │ ├── 33_lcd.rst │ ├── 34_autentication.rst │ ├── 35_external.rst │ ├── 40_index.rst │ ├── 41_contributing.rst │ ├── 42_license.rst │ ├── 43_changelog.rst │ ├── _static │ │ ├── addons001.png │ │ ├── addons002.png │ │ ├── addons003.png │ │ ├── addons006.png │ │ ├── advancedservices001.png │ │ ├── alertanimation001.gif │ │ ├── examples001.png │ │ ├── faq001.png │ │ ├── favicon.ico │ │ ├── favicon.xcf │ │ ├── features001.png │ │ ├── features002.png │ │ ├── firststep001.png │ │ ├── friends001.png │ │ ├── friends002.png │ │ ├── hdd001.png │ │ ├── hdd002.png │ │ ├── hdd003.png │ │ ├── header001.png │ │ ├── helper001.png │ │ ├── helper002.png │ │ ├── helper003.png │ │ ├── helper004.png │ │ ├── helper005.png │ │ ├── helper006.png │ │ ├── helper007.png │ │ ├── helper008.png │ │ ├── helper009.png │ │ ├── helper010.png │ │ ├── helper011.png │ │ ├── helper012.png │ │ ├── interval001.png │ │ ├── label001.png │ │ ├── label002.png │ │ ├── lcd001.png │ │ ├── lcd002.png │ │ ├── lcd003.png │ │ ├── lcd004.png │ │ ├── lcd005.jpg │ │ ├── license001.png │ │ ├── license002.png │ │ ├── license003.png │ │ ├── logo.png │ │ ├── logo.xcf │ │ ├── multipages001.png │ │ ├── multipages002.png │ │ ├── otherdistro001.png │ │ ├── rpimonitorlcd001.jpg │ │ ├── sensor001.png │ │ ├── sensor002.png │ │ ├── sensor010.png │ │ ├── sensor011.png │ │ ├── sensor012.png │ │ ├── tor001.png │ │ ├── visibility001.png │ │ ├── web001.png │ │ ├── web002.png │ │ ├── web003.png │ │ ├── web004.png │ │ ├── wifi001.png │ │ └── wip.png │ ├── _templates │ │ ├── footer.html │ │ └── layout.html │ ├── conf.py │ └── index.rst └── tagimages.sh ├── src ├── etc │ ├── apt │ │ └── sources.list.d │ │ │ └── rpimonitor.list │ ├── cron.d │ │ └── rpimonitor │ ├── init.d │ │ └── rpimonitor │ ├── init │ │ └── rpimonitord.conf │ ├── rpimonitor │ │ ├── daemon.conf │ │ ├── data.conf │ │ └── template │ │ │ ├── Allwinner_H3.conf │ │ │ ├── Allwinner_H3_Extended.conf │ │ │ ├── OrangePi_H3.conf │ │ │ ├── addons.conf │ │ │ ├── advanced_service.conf │ │ │ ├── arch.conf │ │ │ ├── axp209_cpu_pmu_temp.conf │ │ │ ├── chrony.conf │ │ │ ├── cpu.conf │ │ │ ├── cpu_arch.conf │ │ │ ├── dht11.conf │ │ │ ├── entropy.conf │ │ │ ├── example.addons.conf │ │ │ ├── example.alert.conf │ │ │ ├── example.badge_and_label.conf │ │ │ ├── example.friends.conf │ │ │ ├── example.header.conf │ │ │ ├── example.interval.conf │ │ │ ├── example.justgage.conf │ │ │ ├── example.multipage.conf │ │ │ ├── example.postprocess_default.conf │ │ │ ├── example.progressbar.conf │ │ │ ├── example.visibility.conf │ │ │ ├── memory.conf │ │ │ ├── memory_arch.conf │ │ │ ├── memory_legacy.conf │ │ │ ├── network.conf │ │ │ ├── printer.conf │ │ │ ├── raspbian.conf │ │ │ ├── raspbmc.conf │ │ │ ├── rclone.conf │ │ │ ├── remote_service.conf │ │ │ ├── sdcard.conf │ │ │ ├── sdcard_raspbmc.conf │ │ │ ├── sdcard_xbian.conf │ │ │ ├── storage.conf │ │ │ ├── sunxi_axp209.conf │ │ │ ├── swap.conf │ │ │ ├── temperature.conf │ │ │ ├── temperature_xbian.conf │ │ │ ├── tor.conf │ │ │ ├── uptime.conf │ │ │ ├── version.conf │ │ │ ├── weather.conf │ │ │ ├── wlan.conf │ │ │ └── xbian.conf │ └── snmp │ │ └── snmpd.conf.rpimonitor ├── usr │ ├── bin │ │ ├── rpimonitord │ │ └── rpimonitord-snmp │ ├── lib │ │ └── systemd │ │ │ └── system │ │ │ ├── rpimonitord-upgradable.service │ │ │ ├── rpimonitord-upgradable.timer │ │ │ ├── rpimonitord.service │ │ │ └── sunxi-temp-daemon.service │ └── share │ │ └── rpimonitor │ │ ├── scripts │ │ ├── rpimonitor-helper.init │ │ ├── rpimonitor-helper.sh │ │ ├── sunxi-temp-daemon.sh │ │ ├── sunxi_tp_temp │ │ └── updatePackagesStatus.pl │ │ └── web │ │ ├── addons.html │ │ ├── addons │ │ ├── about │ │ │ ├── about.css │ │ │ ├── about.html │ │ │ └── about.js │ │ ├── custom │ │ │ ├── custom.css │ │ │ ├── custom.html │ │ │ ├── custom.js │ │ │ └── custominfo.html │ │ ├── example │ │ │ ├── example.css │ │ │ ├── example.html │ │ │ └── example.js │ │ └── top3 │ │ │ ├── top3 │ │ │ ├── top3.cron │ │ │ ├── top3.html │ │ │ └── top3.js │ │ ├── css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── rpimonitor.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ │ ├── img │ │ ├── avatar.png │ │ ├── cpu.png │ │ ├── cpu_temp.png │ │ ├── daemons.png │ │ ├── favicon.png │ │ ├── glyphicons-halflings-white.png │ │ ├── glyphicons-halflings.png │ │ ├── logo.png │ │ ├── memory.png │ │ ├── network.png │ │ ├── ok.png │ │ ├── pmu.png │ │ ├── preloader.gif │ │ ├── printer.png │ │ ├── sd.png │ │ ├── swap.png │ │ ├── timesync.png │ │ ├── tor.png │ │ ├── uptime.png │ │ ├── usb_hdd.png │ │ ├── user.png │ │ ├── version.png │ │ ├── warning.png │ │ └── wifi.png │ │ ├── index.html │ │ ├── js │ │ ├── Sortable.1.6.1.min.js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── flot │ │ │ ├── jquery.flot.min.js │ │ │ ├── jquery.flot.selection.min.js │ │ │ ├── jquery.flot.stack.min.js │ │ │ └── jquery.flot.tooltip.min.js │ │ ├── javascriptrrd │ │ │ ├── binaryXHR.js │ │ │ ├── rrdFile.js │ │ │ ├── rrdFilter.js │ │ │ ├── rrdFlot.js │ │ │ ├── rrdFlotMatrix.js │ │ │ ├── rrdFlotSupport.js │ │ │ └── rrdMultiFile.js │ │ ├── jquery.min.js │ │ ├── jsqrencode.min.js │ │ ├── justgage.1.0.1.js │ │ ├── justgage.1.0.1.min.js │ │ ├── raphael.2.1.0.min.js │ │ ├── rpimonitor.addons.js │ │ ├── rpimonitor.index.js │ │ ├── rpimonitor.js │ │ ├── rpimonitor.statistics.js │ │ ├── rpimonitor.status.js │ │ └── rpimonitor.utils.js │ │ ├── statistics.html │ │ └── status.html └── var │ └── lib │ └── rpimonitor │ └── updatestatus.txt └── tools ├── addnginxuser.sh ├── conf2man.pl ├── help2man.pl ├── make_ca.sh ├── make_cert.sh ├── netTraffic.sh ├── openssl.cnf └── reverseproxy /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: XavierBerger 4 | # patreon: # Replace with a single Patreon username 5 | # open_collective: # Replace with a single Open Collective username 6 | ko_fi: xavierberger 7 | # tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | # liberapay: # Replace with a single Liberapay username 10 | # issuehunt: # Replace with a single IssueHunt username 11 | # lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | # polar: # Replace with a single Polar username 13 | # buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | # thanks_dev: # Replace with a single thanks.dev username 15 | # custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "docs/source/_themes/sphinx_rtd_theme"] 2 | path = docs/source/_themes/sphinx_rtd_theme 3 | url = git@github.com:snide/sphinx_rtd_theme.git 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGETDIR?=/ 2 | STARTUPSYS?=sysVinit 3 | 4 | all: 5 | @echo "Makefile usage" 6 | @echo "" 7 | @echo " Configuration is done using environment variable" 8 | @echo "" 9 | @echo " TARGETDIR defines where to install RPi-Monitor" 10 | @echo " STARTUPSYS defines the startup system to install. Possible values are:" 11 | @echo " - sysVinit" 12 | @echo " - upstart" 13 | @echo " - systemd" 14 | @echo "" 15 | @echo " The current values are:" 16 | @echo " TARGETDIR=${TARGETDIR}" 17 | @echo " STARTUPSYS=${STARTUPSYS}" 18 | @echo "" 19 | @echo " Once environment variable are set, execute: make install" 20 | @echo "" 21 | 22 | DOCS_DIR = docs 23 | .PHONY: man 24 | man: 25 | @make -C $(DOCS_DIR) man 26 | 27 | install: man 28 | @echo "Installing RPi-Monitor in ${TARGETDIR}" 29 | @mkdir -p ${TARGETDIR}var/lib/rpimonitor 30 | @cp -r src/var/lib/rpimonitor/* ${TARGETDIR}var/lib/rpimonitor/ 31 | @mkdir -p ${TARGETDIR}etc/rpimonitor 32 | @cp -r src/etc/rpimonitor/* ${TARGETDIR}etc/rpimonitor/ 33 | @mkdir -p ${TARGETDIR}etc/cron.d 34 | @cp -r src/etc/cron.d/* ${TARGETDIR}etc/cron.d/ 35 | @mkdir -p ${TARGETDIR}etc/snmp 36 | @cp -r src/etc/snmp/* ${TARGETDIR}etc/snmp/ 37 | @mkdir -p ${TARGETDIR}usr/bin 38 | @cp -r src/usr/bin/* ${TARGETDIR}usr/bin/ 39 | @mkdir -p ${TARGETDIR}usr/share/rpimonitor 40 | @cp -r src/usr/share/rpimonitor/* ${TARGETDIR}usr/share/rpimonitor/ 41 | @echo "Startup system is ${STARTUPSYS}" 42 | @mkdir -p ${TARGETDIR}usr/share/man/man1 43 | @cp -r docs/build/man/rpimonitor.1 ${TARGETDIR}usr/share/man/man1/ 44 | @mkdir -p ${TARGETDIR}usr/share/man/man5 45 | @cp -r docs/build/man/rpimonitor-*.conf.5 ${TARGETDIR}usr/share/man/man5/ 46 | 47 | ifeq (${STARTUPSYS},sysVinit) 48 | @mkdir -p ${TARGETDIR}etc/init.d 49 | @cp -r src/etc/init.d/* ${TARGETDIR}etc/init.d/ 50 | endif 51 | ifeq (${STARTUPSYS},upstart) 52 | @mkdir -p ${TARGETDIR}etc/init 53 | @cp -r src/etc/init/* ${TARGETDIR}etc/init/ 54 | endif 55 | ifeq (${STARTUPSYS},systemd) 56 | @mkdir -p ${TARGETDIR}usr/lib/systemd/system 57 | @cp -r src/usr/lib/systemd/system/* ${TARGETDIR}usr/lib/systemd/system/ 58 | endif 59 | @echo "Installation completed" 60 | 61 | clean: 62 | @echo 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Request for collaboration. 2 | 3 | I don't have time to manage update to `Rpi-Monitor`. 4 | 5 | The project looks to be used be many people. Some PR need to be reviewed and merged and next version is requiring tests. 6 | 7 | If one of you would like to help to manage the project, I'll be happy to grant her/him the right on `Rpi-Monitor` repository. 8 | 9 | I let you contact me if you are interrested. 10 | 11 | Thanks, 12 | 13 | X@v 14 | 15 | ---- 16 | 17 | Looking for a simplest tool, you may have d look to [https://github.com/nekromoff/rpi-monitor-dashboard](https://github.com/nekromoff/rpi-monitor-dashboard) 18 | 19 | ---- 20 | 21 | ![RPi-Monitor logo](docs/source/_static/logo.png) 22 | 23 | # Overview 24 | 25 | **RPi-Monitor** is an application designed to perform real time monitoring embedded devices. 26 | 27 | The development platform is a [Raspberry Pi](http://raspberrypi.org) B. 28 | 29 | **RPi-Monitor** provides a lot of feature such as **Embedded Web server**, **Alert messaging**, **SNMP integration**... 30 | 31 | For details, refer to [keys features of RPi-Monitor](https://xavierberger.github.io/RPi-Monitor-docs/01_features.html) in documentation. 32 | 33 | # Screenshots 34 | 35 | ![MainPage](docs/source/_static/features002.png) 36 | 37 | See [Screenshots](https://xavierberger.github.io/RPi-Monitor-docs/02_screenshots.html) chapter 38 | of documentation to see more screenshots. 39 | 40 | # Installation 41 | 42 | Installation of **RPi-Monitor** is detailled in [getting started](https://xavierberger.github.io/RPi-Monitor-docs/11_installation.html) chapter of documentation. 43 | 44 | Each release can be installed with a Debian package for **Raspbian**. 45 | 46 | For other (unsupported) distribution (such as Gentoo, ArchLinux) refer to [Custom installation](https://xavierberger.github.io/RPi-Monitor-docs/12_custom_installation.html) chapter of documentation. 47 | 48 | # Documentation 49 | 50 | If you want to install, use or customize **RPi-Monitor** refer to [documentation](https://xavierberger.github.io/RPi-Monitor-docs/index.html) 51 | 52 | If you want to see example of configuration and see what **RPi-Monitor** can do, refer to 53 | [RPi-Monitor Usages](https://xavierberger.github.io/RPi-Monitor-docs/30_index.html). 54 | 55 | Frequently Asked Question find answer into the [FAQ](https://xavierberger.github.io/RPi-Monitor-docs/14_faq.html) page. 56 | 57 | # Development 58 | 59 | If you want to participate and propose a pull request, refer to [contributing](https://xavierberger.github.io/RPi-Monitor-docs/41_contributing.html) chapter of documentation. 60 | 61 | **Note**: Pull request perfomed on **develop** branch will be integrated as soon as possible. Pull request perform on master branche may only be integrated when a new version is published (or not may not be integrated at all...) 62 | 63 | # News / License 64 | 65 | **Latest news** : [RPi-Experience Blog](http://rpi-experiences.blogspot.fr/) 66 | 67 | **License**: [GPLv3](LICENSE) 68 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 2.13 2 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Work in progress 2 | Draft version of **RPi-Monitor** documentation: https://xavierberger.github.io/RPi-Monitor-docs/ 3 | 4 | Source of documentation: https://github.com/XavierBerger/RPi-Monitor/tree/feature/docs/docs/source 5 | -------------------------------------------------------------------------------- /docs/genscreenshotpage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Add legend in png image with the following command: 4 | # convert image.png -set 'Doc Width' '500px' -set 'Doc Description' 'Status page' image.png 5 | TARGET=02_screenshots.rst 6 | 7 | 8 | cd source 9 | echo ":github_url: https://github.com/XavierBerger/RPi-Monitor/blob/feature/docs/docs/source/${TARGET}" > ${TARGET} 10 | echo "Screenshots" >> ${TARGET} 11 | echo "===========" >> ${TARGET} 12 | 13 | for IMAGE in $(ls _static/*.png) 14 | do 15 | DESCRIPTION=$(exiftool ${IMAGE} | perl -ne '/Doc Description\s+:\s+(.*)/ and print $1' ) 16 | if [ "" != "${DESCRIPTION}" ] 17 | then 18 | WIDTH=$(exiftool ${IMAGE} | perl -ne '/Doc Width\s+:\s+(.*)/ and print $1' ) 19 | echo "-----" >> ${TARGET} 20 | echo >> ${TARGET} 21 | echo ".. figure:: ${IMAGE}" >> ${TARGET} 22 | echo " :align: center" >> ${TARGET} 23 | if [ "" != "${WIDTH}" ] 24 | then 25 | echo " :width: ${WIDTH}" >> ${TARGET} 26 | fi 27 | echo >> ${TARGET} 28 | echo " ${DESCRIPTION}" >> ${TARGET} 29 | echo >> ${TARGET} 30 | fi 31 | done -------------------------------------------------------------------------------- /docs/linuxfr/RPi-Monitor_1ColumnStatusPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/linuxfr/RPi-Monitor_1ColumnStatusPage.png -------------------------------------------------------------------------------- /docs/linuxfr/RPi-Monitor_3ColumnsStatusPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/linuxfr/RPi-Monitor_3ColumnsStatusPage.png -------------------------------------------------------------------------------- /docs/linuxfr/RPi-Monitor_HawkeyeSelfie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/linuxfr/RPi-Monitor_HawkeyeSelfie.png -------------------------------------------------------------------------------- /docs/linuxfr/RPi-Monitor_ShellInABoxAddOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/linuxfr/RPi-Monitor_ShellInABoxAddOn.png -------------------------------------------------------------------------------- /docs/linuxfr/RPi-Monitor_SmartphoneStatusPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/linuxfr/RPi-Monitor_SmartphoneStatusPage.png -------------------------------------------------------------------------------- /docs/linuxfr/RPi-Monitor_StatisticsPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/linuxfr/RPi-Monitor_StatisticsPage.png -------------------------------------------------------------------------------- /docs/source/01_features.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/01_features.rst 2 | 3 | Keys features of RPi-Monitor 4 | ============================ 5 | 6 | At the beginning **RPi-Monitor** was designed to run on **Raspberry Pi**. This 7 | is explaining the name of this software. In reality **RPi-Monitor** can run 8 | on every computers running `perl`. 9 | 10 | .. figure:: _static/logo.png 11 | :align: center 12 | 13 | Since the beginning **RPi-Monitor** as been designed for embedded devices and 14 | performances is the core of development strategy. 15 | 16 | The software is divided into two main part: 17 | 18 | * A lightweight daemon running on the device and gathering data 19 | * A powerfull WEB application running in browser in charge of data rendering 20 | 21 | .. figure:: _static/features001.png 22 | :align: center 23 | :width: 500px 24 | 25 | Collecting metrics 26 | ------------------ 27 | ``rpimonitord`` is a daemon wich periodically gather, process and store metrics. 28 | In **RPi-Monitor** metrics are named **KPI** for **K**\ ey **P**\ erformance **I**\ ndicator. 29 | 30 | Storing metrics 31 | --------------- 32 | Metrics are stored into a `Round Robin Database `_ (RRD). 33 | This ensure a fixed size for the data storage and keep by default data over 1 year. 34 | 35 | Presenting collected metrics 36 | ---------------------------- 37 | **RPi-Monitor** embed a web server designed to present collected metrics. 38 | Instantaneous data are presented in the status page. Metrics stored in RRD 39 | are presented in statistics pages. 40 | 41 | The web interface allow user to reorganise status information by drag'n drop. 42 | 43 | Statistics page allow to zoom over graph to see details of the mertics. 44 | 45 | Embedded web server can be disable and pages can be served by an external web server. 46 | 47 | Configurable 48 | ------------ 49 | In **RPi-Monitor** everything is configurable: 50 | 51 | - Define what metrics to extract and how to extract them 52 | - Define how to store metrics 53 | - Define how to present and share metrics and statistics 54 | - Define how to detect an alert and what to do when alert appears or disappears 55 | - Define ... what you want to do with **RPi-Monitor** 56 | 57 | Processing metrics and raising alerts 58 | ------------------------------------- 59 | **RPi-Monitor** embed an alert engine fully configurable and able to determine 60 | if metrics are out of expected range and raise alerts. 61 | 62 | When an alert is detected, **RPi-Monitor** can execute an action. For example, sending email or SMS. 63 | 64 | Definition of critera of alert detection as well as action to perform when alert 65 | is detected are fully configurable. 66 | 67 | Read only mode 68 | -------------- 69 | If writing data on disk/eMMC/SSD/SDCard/... is not possible, **RPi-Monitor** 70 | can be executed in **read-only** mode. 71 | 72 | Metrics can be retrived either by web interface in json format or through SNMP. 73 | 74 | Sharing metrics 75 | --------------- 76 | Metrics collected can be downloaded in json format (using the embedded web 77 | server), read on disk or remotely accessed through SNMP. 78 | 79 | Extending the capabilities 80 | -------------------------- 81 | **RPi-Monitor** is extensible. It provides addons allowing customisation of 82 | the interface. For example: `Shellinabox `_ or 83 | `Hawkeye `_. 84 | 85 | **RPi-Monitor-Peeble** allows to see monitoring status on `Peeble `_ smart watch. 86 | 87 | **RPi-Monitor** is also available for `Docker `_ and for embedded devices created 88 | with `Yocto Project `_ 89 | 90 | Screenshots 91 | ----------- 92 | 93 | See `screenshots <02_screenshots.html>`_ on dedicated page. 94 | 95 | .. toctree:: 96 | :maxdepth: 2 97 | :hidden: 98 | 99 | 02_screenshots 100 | 101 | -------------------------------------------------------------------------------- /docs/source/02_screenshots.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/02_screenshots.rst 2 | 3 | Screenshots 4 | =========== 5 | 6 | .. figure:: _static/addons001.png 7 | :align: center 8 | :width: 500px 9 | 10 | Addons welcome page explaining how to use Addons 11 | 12 | ----- 13 | 14 | .. figure:: _static/addons002.png 15 | :align: center 16 | 17 | Top3 addons Addons showing 3 processes using the most time of CPU and `rpimonitord` process cpu usage 18 | 19 | ----- 20 | 21 | .. figure:: _static/addons003.png 22 | :align: center 23 | :width: 500px 24 | 25 | Custom addon example explaining how to use custom addon 26 | 27 | ----- 28 | 29 | .. figure:: _static/addons006.png 30 | :align: center 31 | :width: 500px 32 | 33 | Example addons explaining how to create an addon for **RPi-Monitor** 34 | 35 | ----- 36 | 37 | .. figure:: _static/advancedservices001.png 38 | :align: center 39 | :width: 500px 40 | 41 | Advanced services example showing how to use Labels 42 | 43 | ----- 44 | 45 | .. figure:: _static/features001.png 46 | :align: center 47 | :width: 500px 48 | 49 | Status page 50 | 51 | ----- 52 | 53 | .. figure:: _static/friends001.png 54 | :align: center 55 | :width: 500px 56 | 57 | Status page showing friends 58 | 59 | ----- 60 | 61 | .. figure:: _static/hdd003.png 62 | :align: center 63 | :width: 500px 64 | 65 | Statistics showing disk usage 66 | 67 | ----- 68 | 69 | .. figure:: _static/logo.png 70 | :align: center 71 | :width: 500px 72 | 73 | Official Logo 74 | 75 | ----- 76 | 77 | .. figure:: _static/multipages001.png 78 | :align: center 79 | :width: 500px 80 | 81 | Multiple status pages 82 | 83 | ----- 84 | 85 | .. figure:: _static/multipages002.png 86 | :align: center 87 | :width: 500px 88 | 89 | Multiple statistics pages 90 | 91 | ----- 92 | 93 | .. figure:: _static/sensor002.png 94 | :align: center 95 | :width: 500px 96 | 97 | Statistics with dual axis 98 | 99 | ----- 100 | 101 | .. figure:: _static/tor001.png 102 | :align: center 103 | :width: 500px 104 | 105 | Example of usage: tor-info 106 | 107 | -------------------------------------------------------------------------------- /docs/source/10_index.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/10_index.rst 2 | 3 | Getting started 4 | =============== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | 11_installation 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 12_custom_installation 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | 13_execution 20 | 21 | .. toctree:: 22 | :maxdepth: 2 23 | 24 | 14_faq -------------------------------------------------------------------------------- /docs/source/11_installation.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/11_first_installation.rst 2 | 3 | Installation and upgrade 4 | ======================== 5 | 6 | Installation from repository 7 | ---------------------------- 8 | 9 | **RPi-Monitor** is providing a debian repository. This repository makes 10 | installation and update accessible with the command ``apt``, ``apt-get`` or ``aptitude``. 11 | 12 | To use this repository follow the instruction bellow: 13 | 14 | Install **RPi-Monitor**'s public key to trust **RPi-Monitor** repository: 15 | 16 | :: 17 | 18 | sudo apt-get install dirmngr 19 | sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 43A579636E330A99A8336C14E4E362DE2C0D3C0F 20 | 21 | Execute the following command to add **RPi-Monitor** into your list of repository: 22 | 23 | :: 24 | 25 | echo "deb https://www.giteduberger.fr rpimonitor/" | sudo tee /etc/apt/sources.list.d/rpimonitor.list 26 | 27 | 28 | To install **RPi-Monitor**, execute the following command: 29 | 30 | :: 31 | 32 | sudo apt-get update 33 | sudo apt-get install rpimonitor 34 | 35 | .. hint:: **RPi-Monitor** is designed to start automatically and collect metrics. 36 | The web interface is available on address http://raspberrypi.local:8888. 37 | 38 | .. note:: You may notice that **RPiMonitor** repository is hosted on 39 | `http://giteduberger.fr/ `_ 40 | 41 | 42 | First step 43 | ---------- 44 | 45 | After first installation you will see the following message: 46 | 47 | .. figure:: _static/firststep001.png 48 | :align: center 49 | 50 | Execute the following command to update packages information 51 | 52 | :: 53 | 54 | sudo /etc/init.d/rpimonitor update 55 | 56 | 57 | Upgrade 58 | ------- 59 | 60 | If you have performed an `installation from repository <11_first_installation.html#installation-from-repository>`_ 61 | you can upgrade **RPi-Monitor** with the following command: 62 | 63 | :: 64 | 65 | sudo apt-get update 66 | sudo apt-get upgrade 67 | 68 | 69 | After installation you should excute the following command to update information 70 | about upgradable packages: 71 | 72 | :: 73 | 74 | sudo /etc/init.d/rpimonitor update 75 | -------------------------------------------------------------------------------- /docs/source/13_execution.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/13_execution.rst 2 | 3 | Understanding program execution 4 | =============================== 5 | 6 | Command line 7 | ------------ 8 | ``rpimonitord`` can be directly executed with the following parameters: 9 | 10 | :: 11 | 12 | rpimonitord [-a address][ -b pidfile][[-c configuration_file]...][-d delay][-h][-k][-l logfile] 13 | [-m][-n][-p port][-s][-t timeout][-v[v[...]]][-V] 14 | 15 | 16 | Options 17 | ^^^^^^^ 18 | .. tabularcolumns:: |l{5cm}|c{5cm}|p{10cm}| 19 | 20 | -a,--addr address 21 | Web server bind address 22 | Default: 0.0.0.0 23 | 24 | -b,--background pid-file 25 | Define the pid file when run in background 26 | Default: not set, application run in foreground 27 | 28 | -c,--conf conf-file 29 | Define the configuration file 30 | Default: ``/etc/rpimonitor/data.conf`` ``/etc/rpimonitor/daemon.conf`` 31 | 32 | -d,--delay delay 33 | Delay between check ins seconds 34 | Default : 10 35 | 36 | -l,--logfile log-file 37 | Logfile directory and prefix (ex: ``/var/log/rpimonitor.log``) 38 | Default: ``/dev/null`` 39 | 40 | -p,--port port 41 | Web server port 42 | Default: 8888 43 | 44 | -t,--timeout timeout 45 | KPI read timeout in seconds 46 | Default: 5 47 | 48 | .. note:: If you want to change the default ``delay``, the rrd file will have to be deleted. 49 | ``rpimonitord`` will recreate database at next startup with the new time slice. 50 | 51 | -h,--help 52 | Shows this help and exit 53 | 54 | -i,--interactive 55 | Interactive configuration helper 56 | 57 | -k,--keep 58 | Keep log file (Default: logfile is delete at each start) 59 | 60 | -m,--mib 61 | Get MIB for current configuration 62 | 63 | -n,--noserver 64 | Don't start embeded web server 65 | 66 | -r,--readonly 67 | Read only mode. 68 | 69 | -s,--show 70 | Show configuration as loaded and exit 71 | 72 | -v,--verbose 73 | Write debug info on screen 74 | 75 | -V,--Version 76 | Show version and exit 77 | 78 | Configuration 79 | ------------- 80 | Configuration can be defined into ``/etc/rpimonitor/daemon.conf`` and 81 | ``/etc/rpimonitor/data.conf`` or in a list of files specified by ``-c`` parameter. 82 | 83 | In ``/etc/rpimonitor/template/*.conf``, provided at installation, you can see 84 | how to customize ``rpimonitord``. 85 | 86 | .. note:: * Configuration defined inside a configuration file always overwrite default values. 87 | * Configuration given as command line option always overwrite values defined in files. 88 | 89 | .. warning:: Be sure to use Linux filefeed format with line ending with LF (and not CR/LF like in Windows) 90 | 91 | .. seealso:: See `configuration <20_index.html>`_ chapter for details or `usage <30_index.html>`_ chapter for examples. 92 | 93 | snmp-agent 94 | ---------- 95 | ``rpimonitord-snmp`` is the snmp agent provided by **RPi-Monitor**. This agent 96 | allow ``snmpd`` to access to data exctracted by ``rpimonitord``. 97 | 98 | .. seealso:: See `configuration <20_index.html>`_ chapter for details or `usage <30_index.html>`_ chapter for examples. 99 | 100 | Raw data access 101 | --------------- 102 | Once ``rpimonitord`` is started the data representing the current status are 103 | available in json format and can be downloaded from the root of the web interface 104 | (ex: http://raspberrypi.local:8888) 105 | 106 | * ``static.json`` : Static information extracted at startup 107 | * ``dynamic.json`` : Current values of dynamic information extracted periodically 108 | * ``menu.json`` : Description of menus when multiple pages are configured 109 | 110 | The web interface configuration can also be downloaded in json format: 111 | 112 | * ``statistics.json`` : Description of statistics page 113 | * ``status.json`` : Description of status page 114 | * ``friends.json`` : List of friends 115 | * ``addons.json`` : List of addons 116 | 117 | Statistic information are stored into RRD file available in the directory ``/var/lib/rpimonitor/stat/`` 118 | 119 | Startup script 120 | -------------- 121 | 122 | **RPi-Monitor** is configured to start automatically. ``/etc/init.d/rpimonitor`` 123 | and link in runlevel startup directory (``/etc/rc?.d/``) do the job. 124 | This script can be executed with the following parameters: 125 | 126 | start 127 | Start ``rpimonitord`` daemon 128 | stop 129 | Stop ``rpimonitord`` daemon 130 | restart 131 | Stop and start ``rpimonitord`` daemon 132 | status 133 | Show ``rpimonitord`` status 134 | update 135 | Update 'packages to be installed' list. This information is displayed in default 136 | configuration of Web interface 137 | install_auto_package_status_update 138 | Add a script to automatically call package update script when ``apt`` commands are executed 139 | remove_auto_package_status_update 140 | Remove script automatically call for package update 141 | 142 | Manpages 143 | -------- 144 | 145 | See also **RPi-Monitor** manpages : 146 | 147 | :: 148 | 149 | man rpimonitor 150 | man rpimonitor-data 151 | man rpimonitor-daemon 152 | 153 | -------------------------------------------------------------------------------- /docs/source/20_index.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/20_index.rst 2 | 3 | Configuration 4 | ============= 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | 21_daemon 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 22_extraction 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | 23_configuration_helper 20 | 21 | .. toctree:: 22 | :maxdepth: 2 23 | 24 | 24_web 25 | 26 | .. toctree:: 27 | :maxdepth: 3 28 | 29 | 25_addons 30 | 31 | .. toctree:: 32 | :maxdepth: 2 33 | 34 | 26_alert 35 | 36 | .. toctree:: 37 | :maxdepth: 2 38 | 39 | 27_configuration_templates -------------------------------------------------------------------------------- /docs/source/21_daemon.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/21_daemon.rst 2 | 3 | Daemon configuration 4 | ==================== 5 | 6 | Global configuration 7 | -------------------- 8 | ``daemon`` is defining the behavior of ``rpimonitord``. 9 | 10 | daemon.sharedmemkey=20130906 11 | Define the share memory key (Default: 20130906) 12 | 13 | daemon.delay=10 14 | Define the delay in seconds between 2 KPIs extraction (Default: 10) 15 | 16 | .. important:: If you want to change the default delay, the rrd files in ``/var/lib/rpimonitor/stat`` 17 | have to be deleted. ``rpimonitord`` will recreate these files at next startup. 18 | 19 | daemon.timeout=5 20 | Define the maximum duration in seconds of KPI extraction. If this timeout is triggered, KPI 21 | value will depends on default value configured for this KPI. (Default: 5) 22 | 23 | daemon.noserver=0 24 | Tell ``rpimonitord`` to not start web server (Default: 0) 25 | 26 | daemon.readonly=1 27 | Tell ``rpimonitord`` to not write data on disk. (Default: 0) 28 | 29 | daemon.addr=0.0.0.0 30 | Define the address used by the embedded web server (Default: 0.0.0.0) 31 | 32 | daemon.port=8888 33 | Define port of the embedded web server (Default: 8888) 34 | 35 | daemon.user=pi 36 | Define user used to run embedded web server process (Default: pi) 37 | 38 | .. note:: If user is not existing, process will run with ``uid=1000`` 39 | 40 | daemon.group=pi 41 | Define group used to run embedded web server process (Default: pi) 42 | 43 | .. note:: If group is not existing, process will run with ``gid=1000`` 44 | 45 | .. important:: Extraction daemon of **RPi-Monitor** running as root. 46 | 47 | daemon.webroot=/usr/share/rpimonitor/web 48 | Define the root directory of the web server (Default: ``/usr/share/rpimonitor/web``) 49 | 50 | daemon.datastore=/var/lib/rpimonitor 51 | Define the data storage directory (Default: ``/var/lib/rpimonitor``). 52 | 53 | daemon.logfile=/var/log/rpimonitor.log 54 | Define directory where logs are stored when ``rpimonitor`` starts un background (Default: ``/dev/null``) 55 | 56 | .. note:: when ``rpimonitord`` is started in foreground, information a written in ``/dev/stderr`` 57 | 58 | daemon.loglevel=0 59 | Define log level (Default:0) 60 | 61 | SNMP configuration 62 | ------------------ 63 | ``snmpagent`` is defining SNMP behavior of ``rpimonitord``. 64 | 65 | snmpagent.rootoid=.1.3.6.1.4.1 66 | Define root OID for snmp-agent (Default: .1.3.6.1.4.1) 67 | 68 | snmpagent.enterpriseoid=54321 69 | Define enterprise OID for snmp agent (Default: 54321) 70 | 71 | snmpagent.rpimonitoroid=42 72 | Define rpimonitor OID for snmp agent (Default: 42) 73 | 74 | snmpagent.mibname=RPIMONITOR-MIB 75 | Define MIB name (Default: RPIMONITOR-MIB) 76 | 77 | snmpagent.lastupdate=201802030000Z 78 | Define MIB last update field (Default: 201802030000Z) 79 | 80 | snmpagent.moduleidentity=rpi-experiences 81 | Define MIB module identity (Default: rpi-experiences) 82 | 83 | snmpagent.organisation=RPi-Monitor 84 | Define MIB organisation (Default: RPi-Monitor) 85 | 86 | snmpagent.contactionfo=http://rpi-experiences.blogspot.fr/ 87 | Define MIB contact info (Default: http://rpi-experiences.blogspot.fr/) 88 | 89 | snmpagent.description=description 90 | Define MIB description (Default: description) 91 | 92 | snmpagent.revision=201802030000Z 93 | Define MIB revision (Default: 201802030000Z) 94 | 95 | -------------------------------------------------------------------------------- /docs/source/23_configuration_helper.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/23_configuration_helper.rst 2 | 3 | Interactive Configuration Helper 4 | ================================ 5 | **RPi-Monitor** `Interactive Configuration Helper` is a tool embedded into 6 | ``rpimonitord`` helping to create configuration files. 7 | 8 | This example is detailling how to use it to monitor a ntfs volume. 9 | 10 | First execute the following command: 11 | 12 | ``rpimonitord -i`` 13 | 14 | .. image:: _static/helper001.png 15 | 16 | Press ``Enter`` 17 | 18 | .. image:: _static/helper002.png 19 | 20 | Enter : ``df -t ntfs`` 21 | 22 | .. image:: _static/helper003.png 23 | 24 | **RPi-Monitor** will tell you how it will process the source. 25 | In our example, it will execute the command ``df``. 26 | If it is correct, press ``Enter``, if not, enter ``no`` ( or ``No`` or ``n`` or ``N`` ) 27 | to go back to previous screen. 28 | 29 | .. image:: _static/helper004.png 30 | 31 | RPi-Monitor show you the ouput of the command as defined as source. If the 32 | output is the one expected press ``Enter``, if not, **RPi-Monitor** will ask you 33 | to define the source again. 34 | 35 | .. image:: _static/helper005.png 36 | 37 | By default the regulare expression is ``(.*)``. This will return all the 38 | data given by the source. 39 | In the following screen you will see how we will find the regular expression 40 | extracting the available space of our ntfs drive step by step. 41 | 42 | Step one, hit ``Enter`` to see what is given by the source by default. 43 | 44 | .. image:: _static/helper006.png 45 | 46 | The output is not the one expected hit ``Enter`` to define a new Regular expression. 47 | The data is located after ``sda1``. Lets enter the following regular 48 | expression: ``sda1(.*)`` to get what is after ``sda1``. 49 | 50 | .. image:: _static/helper007.png 51 | 52 | The output is not the one expected yet hit ``Enter`` to define a new regular expression. 53 | The data is located after ``sda1`` after some spaces ``\s+``, some numbers ``\d+``, 54 | some spaces ``\s+``, some numbers ``\d+``, some spaces`` \s+`` and is composed of numbers ``(\d+)``. 55 | Enter then the following regulare expression: ``sda1\s+\d+\s+\d+\s+(\d+)`` 56 | 57 | .. image:: _static/helper008.png 58 | 59 | The result is now the one expected , enter ``Yes`` ( or ``yes`` or ``Y`` or ``y`` ) 60 | 61 | .. image:: _static/helper009.png 62 | 63 | We want the value in ``MB`` while is it given in ``kB``. We then need to divide it by ``1024``. 64 | The formula is then: ``$1/1024`` 65 | 66 | .. image:: _static/helper010.png 67 | 68 | This is the expected value, enter ``yes`` 69 | 70 | .. image:: _static/helper011.png 71 | 72 | The value extracted is variable so ``dynamic`` so enter ``No``. 73 | 74 | .. image:: _static/helper012.png 75 | 76 | **RPi-Monitor** gives you the template of configuration. You now have to copy it 77 | into an existing configuration file or add a new file in 78 | ``/etc/rpimonitord/`` directory or subdirectory. Update the text inside ``<>`` to 79 | define how data should be stored. Include this file in ``data.conf``. 80 | 81 | :: 82 | 83 | dynamic.1.name=storage2_available 84 | dynamic.1.source=df -t ntfs 85 | dynamic.1.regexp=sda1\s+\d+\s+\d+\s+(\d+) 86 | dynamic.1.postprocess=$1/1024 87 | dynamic.1.rrd=GAUGE 88 | 89 | Once the configuration will be apply, restart **RPi-Monitor** with the command: 90 | 91 | ``/etc/init.d/rpimonitor restart`` 92 | -------------------------------------------------------------------------------- /docs/source/25_addons.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/25_addons.rst 2 | 3 | Addons configuration 4 | ==================== 5 | 6 | Addons are custom pages designed to give you the possibility to free your imagination 7 | and cutomise **RPi-Monitor** interface to match your needs. 8 | 9 | Addons are ``html`` pages, ``javascript`` and ``css`` directly integrated into **RPi-Monitor**. 10 | Addons are installed in ``/usr/share/rpimonitor/web/addons/`` and activation is done in configuration file. 11 | 12 | It is possible to use an addon many time into a same configuration file using 13 | different parameters if the addon support them as show hereunder with `custom addon <25_addons.html#id1>`_. 14 | 15 | The next part of this chapter shows some examples of addons and highlight the possibilities of this feature. 16 | 17 | .. figure:: _static/addons001.png 18 | :align: center 19 | :width: 500px 20 | 21 | About Addon 22 | ----------- 23 | 24 | ``About addon`` is activated by default and present addons feature. 25 | 26 | To remove this addons, simply comment out or delete the following lines from ``/etc/rpimonitor/data.conf``. 27 | 28 | :: 29 | 30 | include=/etc/rpimonitor/template/addons.conf 31 | 32 | 33 | Top3 Addon 34 | ---------- 35 | 36 | Top3 is showing how to use addons to add additional information into status page. 37 | 38 | .. figure:: _static/addons002.png 39 | :align: center 40 | :width: 400px 41 | 42 | This addons is designed to periodically generate HTML content. This content can 43 | be accessible from the addons menu and/or can be inserted into status page 44 | using the function ``InsertHTML()``. 45 | 46 | Top3 addons shows the 3 process consuming the most CPU time in addition to 47 | consumption of ``rpimonitord`` process. 48 | 49 | To activate this addon, add the following lines to your configuration file 50 | 51 | :: 52 | 53 | web.addons.1.title=Top3 54 | web.addons.1.addons=top3 55 | 56 | Copy ``/usr/share/rpimonitor/web/addons/top3/top3.cron`` to ``/etc/cron.d/top3`` to activate periodical check. 57 | 58 | To add top3 information into status page, add the following line to configuration file. 59 | 60 | :: 61 | 62 | web.status.1.content.1.line.1=InsertHTML("/addons/top3/top3.html") 63 | 64 | Custom Addon 65 | ------------ 66 | 67 | If you are not confortable with html, javascript and css, the addon custom may 68 | help you to customise **RPi-Monitor** to your wishes. This addons implement an 69 | iframe that can display any other web pages. 70 | 71 | .. figure:: _static/addons003.png 72 | :align: center 73 | :width: 500px 74 | 75 | Custom addon can be configured with the following parameters: 76 | 77 | web.addons..title= 78 | ``<title>`` represent the title displayed in addon menu or addon title 79 | This parameter will be evaluated by the javascript command with the function ``eval()`` 80 | theirfore parameter should be valid javacript. 81 | 82 | web.addons.<id>.addons=custom 83 | ``custom`` is the addon activated 84 | 85 | web.addons.<id>.showtitle=<title visibility> 86 | ``<title visibility>`` define if title should be displayed or not 87 | 88 | web.addons.<id>.url=<url> 89 | ``url`` is defining the page to be displayed into the iframe. It can be a file 90 | reachable from **RPi-Monitor** internal server or a site available on the Internet. 91 | 92 | web.addons.<id>.allowupdate=<allow update> 93 | ``<allow update>`` define is ``url`` can be updated in option 94 | 95 | Shellinabox 96 | ^^^^^^^^^^^ 97 | 98 | `Shellinabox <https://github.com/shellinabox/shellinabox>`_ allow you to access to the shell of your 99 | Raspberry Pi through a web interface. 100 | 101 | Installing shellinabox can be done with the following command: 102 | :: 103 | 104 | apt-get install shellinabox 105 | 106 | By default shellinabox listening on http://raspberrypi.local:4200/. 107 | 108 | Shellinabox can be integrated to **RPi-Monitor** with custom addon as follow: 109 | 110 | :: 111 | 112 | web.addons.1.title=ShelleInABox 113 | web.addons.1.addons=custom 114 | web.addons.1.showtitle=false 115 | web.addons.1.url=https://raspberrypi.local:4200/ 116 | web.addons.1.allowupdate=false 117 | 118 | Webcam 119 | ^^^^^^ 120 | 121 | If you want to see the image of your webcam in your browser, you can use 122 | `hawkeye <https://github.com/ipartola/hawkeye>`_. 123 | Once ``hawkeye`` is installed, it is very easy to add it into **RPi-Monitor** interface 124 | using the custom addon. The configuration will then be the following: 125 | 126 | :: 127 | 128 | web.addons.1.title=Webcam - Hawkeye 129 | web.addons.1.addons=custom 130 | web.addons.1.url=http://raspberrypi.local:8000/ 131 | web.addons.1.allowupdate=false 132 | 133 | ``url`` parameter point to hawkeye web interface. 134 | 135 | .. danger:: If you are doing such a configuration, keep in mind about the 136 | security of your images. You should use the capacity of hawkeye to 137 | restrict the access to the image using a login and a password. 138 | 139 | .. seealso:: You can also have a look to `Authentication and secure access to RPi-Monitor <34_autentication.html>`_. 140 | 141 | Example Addon 142 | ------------- 143 | 144 | If you want to develop your own addon, you can refer to the example addons to 145 | see how to implement such a feature. 146 | 147 | .. figure:: _static/addons006.png 148 | :align: center 149 | :width: 500px 150 | 151 | Example addon is providing a ``html`` page, a ``javacript`` and a ``css`` showing 152 | how an addon page can interact with **RPi-Monitor**. 153 | 154 | Example addon can activate by adding the following lines into the configuration file: 155 | 156 | :: 157 | 158 | web.addons.1.title=Addon example 159 | web.addons.1.addons=example 160 | web.addons.1.showtitle=true 161 | web.addons.1.parameter=parameter_example 162 | -------------------------------------------------------------------------------- /docs/source/26_alert.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/26_alert.rst 2 | 3 | Alert configuration 4 | =================== 5 | **RPi-Monitor** is able to detect if value exceed a defined value or come back to the normal. 6 | 7 | Overview 8 | -------- 9 | Alert/Cancel are sent only when the state is stable to avoid messages 10 | flooding when limit is about to be exceeded as shown in schema bellow: 11 | 12 | .. code-block:: text 13 | 14 | send alert 15 | ^ 16 | th th <------dh------>| th 17 | _____ __________________|______ _______ send cancel 18 | | | | | | | ^ 19 | | | | | | | | 20 | __| |___| |___| |______________|_____ 21 | tl tl tl<-----dl-----> 22 | |------------------------------| 23 | Alert is raised 24 | 25 | If alert is still active after resend period, alerte is sent again: 26 | 27 | .. code-block:: text 28 | 29 | send alert resend alert 30 | ^ ^ 31 | th <-----dh------>|<---------------------dr---------------------->| 32 | __________________|_______________________________________________|_____ 33 | | 34 | | 35 | ____| 36 | tl |-----------------------------------------------------> 37 | Alert is raised 38 | 39 | Configuration 40 | ------------- 41 | 42 | Each alert is identified by its ``<alert name>``. 43 | 44 | alert.<alert name>.active=<activation condition> 45 | <activation condition> defines the alert pre-condition. If this formula 46 | returns false, the trigger will not be checked. Default value is 1. 47 | This command could refer to KPI using keyword ``data.<kpi name>`` 48 | 49 | alert.<alert name>.kpi=<trigger> 50 | ``<trigger>`` is defining the formula to evaluate. If formula returns true, the 51 | alert is detected. This command should refer to KPI using keyword ``data.<kpi name>`` 52 | 53 | alert.<alert name>.maxalertduration=<duration before raise> 54 | The alert will be dectected immediatly but alert raised commande will 55 | be executed only afer a defined ``<duration before raise>`` in seconds 56 | (``dh`` in the upper schema) 57 | 58 | alert.<alert name>.cancelvalidation=<duration before cancel> 59 | As for alert raising, cancellation command will be executed only after 60 | ``<duration before cancel>`` seconds (``dl`` in the upper schema) 61 | 62 | alert.<alert name>.resendperiod=<period> 63 | If alert is still active after ``<period>`` seconds, the raise command 64 | will be executed again (``dr`` in the upper schema). 65 | 66 | alert.<alert name>.raisecommand=<Raise Command> 67 | ``<Raise Command>`` is the command to executed when an alert is raised. 68 | This command could refer to KPI using keyword ``data.<kpi name>`` 69 | 70 | alert.<alert name>.cancelcommand=<Cancel Command> 71 | ``<Cancel Command>`` is the command to executed when an alert is canceled 72 | This command could refer to KPI using keyword ``data.<kpi name>`` 73 | 74 | .. seealso:: Example of implementation in `Alert example <27_configuration_templates.html#alerts>`_ -------------------------------------------------------------------------------- /docs/source/30_index.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/30_index.rst 2 | 3 | Usages 4 | ====== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | 31_configuration_examples 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 32_sensors 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | 33_lcd 20 | 21 | .. toctree:: 22 | :maxdepth: 2 23 | 24 | 34_autentication 25 | 26 | .. toctree:: 27 | :maxdepth: 2 28 | 29 | 35_external 30 | -------------------------------------------------------------------------------- /docs/source/40_index.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/40_index.rst 2 | 3 | To go further 4 | ============== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | 41_contributing 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 42_license 15 | 16 | .. toctree:: 17 | :maxdepth: 1 18 | 19 | 43_changelog 20 | -------------------------------------------------------------------------------- /docs/source/42_license.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/42_license.rst 2 | 3 | Authors and Licenses 4 | ==================== 5 | 6 | Authors 7 | ------- 8 | 9 | Maintener: 10 | XavierBerger 11 | 12 | Contributors: 13 | https://github.com/XavierBerger/RPi-Monitor/graphs/contributors 14 | 15 | --------- 16 | 17 | Licenses 18 | -------- 19 | 20 | .. figure:: _static/license001.png 21 | :align: center 22 | 23 | Documentation license: `Creative Commons Attribution-ShareAlike 4.0 24 | International License <http://creativecommons.org/licenses/by-sa/4.0/>`_ 25 | 26 | .. figure:: _static/license002.png 27 | :align: center 28 | 29 | **RPi-Monitor** software is published under **GNU General Public License v3** 30 | 31 | ^^^^^^^^ 32 | 33 | GNU GENERAL PUBLIC LICENSE 34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 35 | 36 | .. include:: ../../LICENSE 37 | :literal: -------------------------------------------------------------------------------- /docs/source/_static/addons001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/addons001.png -------------------------------------------------------------------------------- /docs/source/_static/addons002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/addons002.png -------------------------------------------------------------------------------- /docs/source/_static/addons003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/addons003.png -------------------------------------------------------------------------------- /docs/source/_static/addons006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/addons006.png -------------------------------------------------------------------------------- /docs/source/_static/advancedservices001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/advancedservices001.png -------------------------------------------------------------------------------- /docs/source/_static/alertanimation001.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/alertanimation001.gif -------------------------------------------------------------------------------- /docs/source/_static/examples001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/examples001.png -------------------------------------------------------------------------------- /docs/source/_static/faq001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/faq001.png -------------------------------------------------------------------------------- /docs/source/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/favicon.ico -------------------------------------------------------------------------------- /docs/source/_static/favicon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/favicon.xcf -------------------------------------------------------------------------------- /docs/source/_static/features001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/features001.png -------------------------------------------------------------------------------- /docs/source/_static/features002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/features002.png -------------------------------------------------------------------------------- /docs/source/_static/firststep001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/firststep001.png -------------------------------------------------------------------------------- /docs/source/_static/friends001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/friends001.png -------------------------------------------------------------------------------- /docs/source/_static/friends002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/friends002.png -------------------------------------------------------------------------------- /docs/source/_static/hdd001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/hdd001.png -------------------------------------------------------------------------------- /docs/source/_static/hdd002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/hdd002.png -------------------------------------------------------------------------------- /docs/source/_static/hdd003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/hdd003.png -------------------------------------------------------------------------------- /docs/source/_static/header001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/header001.png -------------------------------------------------------------------------------- /docs/source/_static/helper001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper001.png -------------------------------------------------------------------------------- /docs/source/_static/helper002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper002.png -------------------------------------------------------------------------------- /docs/source/_static/helper003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper003.png -------------------------------------------------------------------------------- /docs/source/_static/helper004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper004.png -------------------------------------------------------------------------------- /docs/source/_static/helper005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper005.png -------------------------------------------------------------------------------- /docs/source/_static/helper006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper006.png -------------------------------------------------------------------------------- /docs/source/_static/helper007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper007.png -------------------------------------------------------------------------------- /docs/source/_static/helper008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper008.png -------------------------------------------------------------------------------- /docs/source/_static/helper009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper009.png -------------------------------------------------------------------------------- /docs/source/_static/helper010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper010.png -------------------------------------------------------------------------------- /docs/source/_static/helper011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper011.png -------------------------------------------------------------------------------- /docs/source/_static/helper012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/helper012.png -------------------------------------------------------------------------------- /docs/source/_static/interval001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/interval001.png -------------------------------------------------------------------------------- /docs/source/_static/label001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/label001.png -------------------------------------------------------------------------------- /docs/source/_static/label002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/label002.png -------------------------------------------------------------------------------- /docs/source/_static/lcd001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/lcd001.png -------------------------------------------------------------------------------- /docs/source/_static/lcd002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/lcd002.png -------------------------------------------------------------------------------- /docs/source/_static/lcd003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/lcd003.png -------------------------------------------------------------------------------- /docs/source/_static/lcd004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/lcd004.png -------------------------------------------------------------------------------- /docs/source/_static/lcd005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/lcd005.jpg -------------------------------------------------------------------------------- /docs/source/_static/license001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/license001.png -------------------------------------------------------------------------------- /docs/source/_static/license002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/license002.png -------------------------------------------------------------------------------- /docs/source/_static/license003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/license003.png -------------------------------------------------------------------------------- /docs/source/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/logo.png -------------------------------------------------------------------------------- /docs/source/_static/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/logo.xcf -------------------------------------------------------------------------------- /docs/source/_static/multipages001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/multipages001.png -------------------------------------------------------------------------------- /docs/source/_static/multipages002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/multipages002.png -------------------------------------------------------------------------------- /docs/source/_static/otherdistro001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/otherdistro001.png -------------------------------------------------------------------------------- /docs/source/_static/rpimonitorlcd001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/rpimonitorlcd001.jpg -------------------------------------------------------------------------------- /docs/source/_static/sensor001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/sensor001.png -------------------------------------------------------------------------------- /docs/source/_static/sensor002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/sensor002.png -------------------------------------------------------------------------------- /docs/source/_static/sensor010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/sensor010.png -------------------------------------------------------------------------------- /docs/source/_static/sensor011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/sensor011.png -------------------------------------------------------------------------------- /docs/source/_static/sensor012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/sensor012.png -------------------------------------------------------------------------------- /docs/source/_static/tor001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/tor001.png -------------------------------------------------------------------------------- /docs/source/_static/visibility001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/visibility001.png -------------------------------------------------------------------------------- /docs/source/_static/web001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/web001.png -------------------------------------------------------------------------------- /docs/source/_static/web002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/web002.png -------------------------------------------------------------------------------- /docs/source/_static/web003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/web003.png -------------------------------------------------------------------------------- /docs/source/_static/web004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/web004.png -------------------------------------------------------------------------------- /docs/source/_static/wifi001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/wifi001.png -------------------------------------------------------------------------------- /docs/source/_static/wip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/docs/source/_static/wip.png -------------------------------------------------------------------------------- /docs/source/_templates/footer.html: -------------------------------------------------------------------------------- 1 | {% extends "!footer.html" %} 2 | 3 | {%- block extrafooter %} 4 | {% if google_adsense is defined %} 5 | <ins class="adsbygoogle" 6 | style="display:block" 7 | data-ad-client="{{ google_adsense }}" 8 | data-ad-slot="{{ google_adsense_slot }}" 9 | data-ad-format="auto"></ins> 10 | <script> 11 | (adsbygoogle = window.adsbygoogle || []).push({}); 12 | </script> 13 | {% endif %} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /docs/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {% block extrahead %} 4 | 5 | {% if google_adsense is defined %} 6 | <script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 7 | <script> 8 | (adsbygoogle = window.adsbygoogle || []).push({ 9 | google_ad_client: "{{ google_adsense }}", 10 | enable_page_level_ads: true 11 | }); 12 | </script> 13 | {% endif %} 14 | 15 | {% if google_analytics is defined %} 16 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-114314379-1"></script> 17 | <script> 18 | window.dataLayer = window.dataLayer || []; 19 | function gtag(){dataLayer.push(arguments);} 20 | gtag('js', new Date()); 21 | 22 | gtag('config', '{{ google_analytics }}'); 23 | </script> 24 | {% endif %} 25 | {% endblock %} 26 | 27 | {% block menu %} 28 | {{ super() }} 29 | {% if google_adsense is defined and google_adsense_slot is defined %} 30 | <hr /> 31 | <div style="padding: 0;"> 32 | <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 33 | <ins class="adsbygoogle" 34 | style="display:inline-block;width:300px;height:250px" 35 | data-ad-client="{{ google_adsense }}" 36 | data-ad-slot="{{ google_adsense_slot }}"></ins> 37 | <script> 38 | (adsbygoogle = window.adsbygoogle || []).push({}); 39 | </script> 40 | </div> 41 | {% endif %} 42 | {% endblock %} 43 | 44 | {% block extrabody %} 45 | {% if 'wip' in meta %} 46 | <img style="position: fixed; top: 0; right: 0; z-index: 100; height:300px; border: 0;" src="_images/wip.png"> 47 | {% endif %} 48 | {% endblock %} -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/index.rst 2 | 3 | Welcome to RPi-Monitor documentation ! 4 | ====================================== 5 | 6 | .. figure:: _static/logo.png 7 | :align: center 8 | 9 | **RPi-Monitor** is a software designed to monitor the metrics from GNU/Linux 10 | system and connected peripherals. It store statistic into local Round Robin 11 | Database and embed a web server allowing to display current status and statistics. 12 | 13 | This documentation is presenting the features provided by **RPi-Monitor** and 14 | explains how to install, configure and use it. 15 | 16 | .. sidebar:: Work in progress 17 | 18 | *Pages with the following ribbon are not yet validated and may contain not accurate information.* 19 | 20 | .. image:: _static/wip.png 21 | :width: 150px 22 | :align: center 23 | 24 | Table of Content 25 | ---------------- 26 | 27 | .. toctree:: 28 | :maxdepth: 10 29 | :includehidden: 30 | 31 | 01_features 32 | 33 | .. toctree:: 34 | :maxdepth: 2 35 | 36 | 10_index 37 | 38 | .. toctree:: 39 | :maxdepth: 2 40 | 41 | 20_index 42 | 43 | .. toctree:: 44 | :maxdepth: 2 45 | 46 | 30_index 47 | 48 | .. toctree:: 49 | :maxdepth: 2 50 | 51 | 40_index 52 | -------------------------------------------------------------------------------- /docs/tagimages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for IMAGE in $(ls source/_static/*.png) 3 | do 4 | qiv ${IMAGE} & 5 | PID=$! 6 | 7 | exiftool ${IMAGE} | perl -ne '/Doc Description\s+:\s(.*)/ and print "$1"' 8 | echo 9 | echo -n "Description: " 10 | read DESCRIPTION 11 | if [ "" != "${DESCRIPTION}" ] 12 | then 13 | WIDTH=$(exiftool ${IMAGE} | perl -ne '/Image Width\s+:\s(\d+)/ and print "$1"') 14 | if [ WIDTH > 500 ] 15 | then 16 | convert ${IMAGE} -set 'Doc Width' '500px' ${IMAGE} 17 | fi 18 | 19 | convert ${IMAGE} -set 'Doc Description' "${DESCRIPTION}" ${IMAGE} 20 | fi 21 | kill -9 ${PID} > /dev/null 2>&1 22 | echo 23 | done -------------------------------------------------------------------------------- /src/etc/apt/sources.list.d/rpimonitor.list: -------------------------------------------------------------------------------- 1 | # RPi-Monitor official repository 2 | deb https://giteduberger.fr rpimonitor/ 3 | -------------------------------------------------------------------------------- /src/etc/cron.d/rpimonitor: -------------------------------------------------------------------------------- 1 | # run at 03:05 to update local repository database 2 | 05 03 * * * root /usr/bin/apt-get update > /dev/null 2>&1 3 | 4 | # run at 03:10 to update status 5 | 10 03 * * * root /usr/share/rpimonitor/scripts/updatePackagesStatus.pl 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/etc/init.d/rpimonitor: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: rpimonitor 4 | # Required-Start: $remote_fs $syslog $network 5 | # Required-Stop: $remote_fs $syslog $network 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # X-Interactive: true 9 | # Short-Description: RPi-Monitor daemon 10 | # Description: RPi-Monitor: real time monitoring for embedded devices 11 | ### END INIT INFO 12 | 13 | # Source function library. 14 | . /lib/lsb/init-functions 15 | 16 | DAEMON="/usr/bin/rpimonitord" 17 | PIDFILE="/var/run/rpimonitord.pid" 18 | LOGFILE="/var/log/rpimonitor.log" 19 | 20 | [ -x $DAEMON ] || exit 0 21 | 22 | checkroot(){ 23 | if [ "$(id -u)" != "0" ]; then 24 | echo "This script must be run as root" 25 | exit 1 26 | fi 27 | } 28 | 29 | start() { 30 | touch $PIDFILE 31 | 32 | for pid in $(cat $PIDFILE); do 33 | if ( kill -0 $pid > /dev/null 2>&1 ); then 34 | echo "Rpi-Monitor is already running."; 35 | status; 36 | return 0; 37 | fi 38 | done; 39 | 40 | log_daemon_msg "Starting RPi-Monitor" 41 | LC_ALL=C nice -n 19 $DAEMON -b $PIDFILE $CONFFILE -l $LOGFILE 42 | log_end_msg $? 43 | } 44 | 45 | stop() { 46 | touch $PIDFILE 47 | log_daemon_msg "Stopping RPi-Monitor" 48 | kill -15 $(cat $PIDFILE) > /dev/null 2>&1 49 | log_end_msg $? 50 | rm $PIDFILE 51 | } 52 | 53 | restart() { 54 | stop 55 | sleep 2 56 | start 57 | } 58 | 59 | status(){ 60 | log_daemon_msg "RPi-Monitor status" 61 | kill -0 $(cat $PIDFILE 2> /dev/null) > /dev/null 2>&1 62 | log_end_msg $? 63 | } 64 | 65 | update() { 66 | log_daemon_msg "RPi-Monitor update packages status" 67 | apt-get update >/dev/null 2>&1 68 | /usr/share/rpimonitor/scripts/updatePackagesStatus.pl 69 | log_end_msg $? 70 | } 71 | 72 | install_auto_package_status_update() { 73 | log_daemon_msg "RPi-Monitor installing automatic update for packages status" 74 | 75 | cat > /etc/apt/apt.conf.d/99rpimonitor << EOF 76 | # Update rpimonitor status 77 | APT::Update::Post-Invoke { 78 | "echo 'Update rpimonitor Packages Status' && /usr/share/rpimonitor/scripts/updatePackagesStatus.pl"; 79 | }; 80 | EOF 81 | 82 | log_end_msg $? 83 | } 84 | 85 | remove_auto_package_status_update() { 86 | log_daemon_msg "RPi-Monitor removing automatic update for packages status" 87 | rm /etc/apt/apt.conf.d/99rpimonitor > /dev/null 2>&1 88 | log_end_msg $? 89 | } 90 | 91 | checkroot 92 | case "$1" in 93 | start) 94 | start 95 | ;; 96 | stop) 97 | stop 98 | ;; 99 | status) 100 | status 101 | ;; 102 | restart) 103 | restart 104 | ;; 105 | install_auto_package_status_update) 106 | install_auto_package_status_update 107 | ;; 108 | remove_auto_package_status_update) 109 | remove_auto_package_status_update 110 | ;; 111 | update) 112 | update 113 | ;; 114 | *) 115 | echo "Usage: $0 {start|stop|restart|status|update|install_auto_package_status_update|remove_auto_package_status_update}" 116 | ;; 117 | esac 118 | 119 | exit 0 120 | -------------------------------------------------------------------------------- /src/etc/init/rpimonitord.conf: -------------------------------------------------------------------------------- 1 | # 2 | # rpimonitord - RPi-Monitor upstart script 3 | # 4 | 5 | description "RPi-Monitor" 6 | 7 | start on runlevel [2345] 8 | stop on runlevel [!2345] 9 | 10 | script 11 | cd /usr/local/rpimonitor/ 12 | exec /usr/bin/rpimonitord 13 | end script 14 | 15 | respawn 16 | respawn limit 15 5 17 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/daemon.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Daemon configuration 3 | # Section 'daemon' is defining the behavior of rpimonitord. 4 | ######################################################################## 5 | #daemon.sharedmemkey=20130906 6 | #daemon.delay=10 7 | #daemon.defaultinterval=1 8 | #daemon.timeout=10 9 | #daemon.noserver=0 10 | #daemon.readonly=0 11 | #daemon.addr=0.0.0.0 12 | #daemon.port=8888 13 | #daemon.user=pi 14 | #daemon.group=pi 15 | #daemon.webroot=/usr/share/rpimonitor/web 16 | #daemon.datastore=/var/lib/rpimonitor 17 | #daemon.logfile=/var/log/rpimonitor.log 18 | #daemon.loglevel=0 19 | ######################################################################## 20 | # SNMP configuration 21 | # Section 'snmpagent' is defining SNMP behavior of rpimonitord. 22 | ######################################################################## 23 | #snmpagent.rootoid=.1.3.6.1.4.1 24 | #snmpagent.enterpriseoid=54321 25 | #snmpagent.rpimonitoroid=42 26 | #snmpagent.mibname=RPIMONITOR-MIB 27 | #snmpagent.lastupdate=201802030000Z 28 | #snmpagent.moduleidentity=rpi-experiences 29 | #snmpagent.organisation=RPi-Monitor 30 | #snmpagent.contactionfo=http://rpi-experiences.blogspot.fr/ 31 | #snmpagent.description=description 32 | #snmpagent.revision=201802030000Z 33 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/data.conf: -------------------------------------------------------------------------------- 1 | template/raspbian.conf -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/Allwinner_H3.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract H3 information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - cpu frequency - yes - yes 6 | # - cpu load 1, 5, 15 - yes - yes 7 | # - cpu scaling governor - yes - no 8 | # - cpus available - yes - yes 9 | # - dram frequency - yes - yes 10 | # - zone1/SoC temperature - yes - yes 11 | ######################################################################## 12 | dynamic.1.name=cpu_frequency 13 | dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 14 | dynamic.1.regexp=(.*) 15 | dynamic.1.postprocess=sprintf("%.3f", $1/1000000) 16 | dynamic.1.rrd=GAUGE 17 | 18 | dynamic.2.name=load1,load5,load15 19 | dynamic.2.source=/proc/loadavg 20 | dynamic.2.regexp=^(\S+)\s(\S+)\s(\S+) 21 | dynamic.2.postprocess= 22 | dynamic.2.rrd=GAUGE 23 | 24 | dynamic.3.name=scaling_governor 25 | dynamic.3.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 26 | dynamic.3.regexp=(.*) 27 | dynamic.3.postprocess= 28 | dynamic.3.rrd= 29 | 30 | dynamic.4.name=cpu_count 31 | dynamic.4.source=/usr/bin/expr 1 + `/usr/bin/awk -F": " '/^processor/ {print $2}' < /proc/cpuinfo | /usr/bin/tail -n1` 32 | dynamic.4.regexp=(.*) 33 | dynamic.4.postprocess= 34 | dynamic.4.rrd=GAUGE 35 | 36 | dynamic.5.name=dram_frequency 37 | dynamic.5.source=/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/cur_freq 38 | dynamic.5.regexp=(.*) 39 | dynamic.5.postprocess=sprintf("%.3f", $1/1000000) 40 | dynamic.5.rrd=GAUGE 41 | 42 | dynamic.6.name=soctemp 43 | dynamic.6.source=/sys/class/thermal/thermal_zone1/temp 44 | dynamic.6.regexp=(.*) 45 | #dynamic.6.postprocess=sprintf("%.1f", $1/1000) 46 | dynamic.6.postprocess= 47 | dynamic.6.rrd=GAUGE 48 | 49 | dynamic.7.name=zone0 50 | dynamic.7.source=/sys/class/thermal/thermal_zone0/temp 51 | dynamic.7.regexp=(.*) 52 | dynamic.7.postprocess= 53 | dynamic.7.rrd=GAUGE 54 | 55 | web.status.1.content.1.title="CPU" 56 | web.status.1.content.1.icon=cpu.png 57 | #web.status.1.content.1.line.1="Loads: <b>" + data.load1 + "</b> [1min] - <b>" + data.load5 + "</b> [5min] - <b>" + data.load15 + "</b> [15min]" 58 | web.status.1.content.1.line.1=JustGageBar("Load", "1min", 0, data.load1, 3, 100, 80)+" "+JustGageBar("Load", "5min", 0, data.load5, 3, 100, 80)+" "+JustGageBar("Load", "15min", 0, data.load15, 3, 100, 80) 59 | web.status.1.content.1.line.2="CPU frequency: <b>" + data.cpu_frequency + "GHz</b>  DRAM frequency: <b>" + data.dram_frequency + "GHz</b>" 60 | web.status.1.content.1.line.3="Governor: <b>" + data.scaling_governor + "</b>  Active CPU cores: <b>" + data.cpu_count + "</b>" 61 | 62 | web.status.1.content.2.title="Temperature" 63 | web.status.1.content.2.icon=cpu_temp.png 64 | web.status.1.content.2.line.1=JustGageBar("SoC", "°C",0, data.soctemp , 100,100,80,percentColors,50,70) 65 | 66 | web.statistics.1.content.1.title="Load / Clockspeeds / Temperature" 67 | web.statistics.1.content.1.graph.1=load1 68 | web.statistics.1.content.1.graph.2=load5 69 | web.statistics.1.content.1.graph.3=load15 70 | web.statistics.1.content.1.graph.4=cpu_frequency 71 | web.statistics.1.content.1.graph.5=dram_frequency 72 | web.statistics.1.content.1.graph.6=cpu_count 73 | web.statistics.1.content.1.graph.7=soctemp 74 | web.statistics.1.content.1.graph.8=zone0 75 | web.statistics.1.content.1.ds_graph_options.load1.label=Load 1 min 76 | web.statistics.1.content.1.ds_graph_options.load5.label=Load 5 min 77 | web.statistics.1.content.1.ds_graph_options.load15.label=Load 15 min 78 | web.statistics.1.content.1.ds_graph_options.cpu_frequency.label=CPU Clock speed (GHz) 79 | web.statistics.1.content.1.ds_graph_options.cpu_frequency.yaxis=2 80 | web.statistics.1.content.1.ds_graph_options.dram_frequency.label=DRAM Clock speed (GHz) 81 | web.statistics.1.content.1.ds_graph_options.dram_frequency.yaxis=2 82 | web.statistics.1.content.1.ds_graph_options.cpu_count.label=Active CPUs 83 | web.statistics.1.content.1.ds_graph_options.cpu_count.yaxis=2 84 | web.statistics.1.content.1.ds_graph_options.soctemp.label=SoC temp (°C) 85 | web.statistics.1.content.1.ds_graph_options.zone0.label=zone0 temp (°C) 86 | web.statistics.1.content.1.graph_options.y1axis={ position: "left", min: 35, max: 75 } 87 | web.statistics.1.content.1.graph_options.y2axis={ position: "right" } 88 | 89 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/OrangePi_H3.conf: -------------------------------------------------------------------------------- 1 | web.page.icon='img/logo.png' 2 | web.page.menutitle='OPi-Monitor <sub>('+data.hostname+')</sub>' 3 | web.page.pagetitle='OPi-Monitor ('+data.hostname+')' 4 | 5 | include=/etc/rpimonitor/template/version.conf 6 | include=/etc/rpimonitor/template/uptime.conf 7 | #include=/etc/rpimonitor/template/Allwinner_H3.conf 8 | include=/etc/rpimonitor/template/Allwinner_H3_Extended.conf 9 | include=/etc/rpimonitor/template/memory.conf 10 | #include=/etc/rpimonitor/template/swap.conf 11 | include=/etc/rpimonitor/template/sdcard.conf 12 | include=/etc/rpimonitor/template/network.conf 13 | 14 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/addons.conf: -------------------------------------------------------------------------------- 1 | web.addons.1.title="Addons" 2 | web.addons.1.addons=about -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/advanced_service.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract information about Services 3 | # 4 | ######################################################################## 5 | dynamic.1.name=kodi_desc 6 | dynamic.1.source=service kodi status | grep "kodi.service - " 7 | dynamic.1.regexp=- (.*) 8 | dynamic.2.name=kodi_act 9 | dynamic.2.source=service kodi status | grep "Active: " 10 | dynamic.2.regexp=(\(.*\)) 11 | dynamic.3.name=kodi_runtime 12 | dynamic.3.source=service kodi status | grep "Active: " 13 | dynamic.3.regexp=; (.*) 14 | 15 | dynamic.4.name=rpimonitor_desc 16 | dynamic.4.source=service rpimonitor status | grep "rpimonitor.service -" 17 | dynamic.4.regexp=- (.*) 18 | dynamic.5.name=rpimonitor_act 19 | dynamic.5.source=service rpimonitor status | grep "Active: " 20 | dynamic.5.regexp=(\(.*\)) 21 | dynamic.6.name=rpimonitor_runtime 22 | dynamic.6.source=service rpimonitor status | grep "Active: " 23 | dynamic.6.regexp=; (.*) 24 | 25 | dynamic.7.name=smbd_desc 26 | dynamic.7.source=service smbd status | grep "smbd.service - " 27 | dynamic.7.regexp=- (.*) 28 | dynamic.8.name=smbd_act 29 | dynamic.8.source=service smbd status | grep "Active: " 30 | dynamic.8.regexp=(\(.*\)) 31 | dynamic.9.name=smbd_runtime 32 | dynamic.9.source=service smbd status | grep "Active: " 33 | dynamic.9.regexp=; (.*) 34 | 35 | dynamic.10.name=sslocal_desc 36 | dynamic.10.source=service sslocal status | grep "sslocal.service - " 37 | dynamic.10.regexp=- (.*) 38 | dynamic.11.name=sslocal_act 39 | dynamic.11.source=service sslocal status | grep "Active: " 40 | dynamic.11.regexp=(\(.*\)) 41 | dynamic.12.name=sslocal_runtime 42 | dynamic.12.source=service sslocal status | grep "Active: " 43 | dynamic.12.regexp=; (.*) 44 | 45 | dynamic.13.name=ssh_desc 46 | dynamic.13.source=service ssh status | grep "ssh.service - " 47 | dynamic.13.regexp=- (.*) 48 | dynamic.14.name=ssh_act 49 | dynamic.14.source=service ssh status | grep "Active: " 50 | dynamic.14.regexp=(\(.*\)) 51 | dynamic.15.name=ssh_runtime 52 | dynamic.15.source=service ssh status | grep "Active: " 53 | dynamic.15.regexp=; (.*) 54 | 55 | dynamic.16.name=xrdp_desc 56 | dynamic.16.source=service xrdp status | grep "xrdp.service - " 57 | dynamic.16.regexp=- (.*) 58 | dynamic.17.name=xrdp_act 59 | dynamic.17.source=service xrdp status | grep "Active: " 60 | dynamic.17.regexp=(\(.*\)) 61 | dynamic.18.name=xrdp_runtime 62 | dynamic.18.source=service xrdp status | grep "Active: " 63 | dynamic.18.regexp=; (.*) 64 | 65 | dynamic.19.name=deluge_daemon_desc 66 | dynamic.19.source=service deluge-daemon status | grep "deluge-daemon.service - " 67 | dynamic.19.regexp=- (.*) 68 | dynamic.20.name=deluge_daemon_act 69 | dynamic.20.source=service deluge-daemon status | grep "Active: " 70 | dynamic.20.regexp=(\(.*\)) 71 | dynamic.21.name=deluge_daemon_runtime 72 | dynamic.21.source=service deluge-daemon status | grep "Active: " 73 | dynamic.21.regexp=; (.*) 74 | 75 | web.status.1.content.1.title="Services" 76 | web.status.1.content.1.icon=daemons.png 77 | web.status.1.content.1.line.1="<style type=\"text/css\">.tg331 {border-collapse:collapse;border-spacing:0;}.tg331 tr:nth-child(even){background-color: #f2f2f2}.tg331 table{border: 0px solid #e9e9e9;}.tg331 td{font-family:Arial, sans-serif;font-size:14px;padding:12px 2px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}.tg331 th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:12px 2px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}.tg331 .tg331-yw4l{vertical-align:top;text-align: left;}.tg331 hr {display: block;margin-top: 0.5em;margin-bottom: 0.5em;margin-left: auto;margin-right: auto;border-style: inset; border-width: 1px;}</style><table width=\"100%\" class=\"tg331\"><tr><td><b>Status</b></td><td><b>Service Name</b></td><td><b>Service Description</b></td><td><b>Run Time</b></td></tr><tr><td>"+Label(data.kodi_act,"=='(running)'","OK","success")+Label(data.kodi_act,"!='(running)'","KO","danger")+"</td><td><b>kodi</b></td><td>" + data.kodi_desc + "</td><td>"+Label(data.kodi_act,"=='(running)'",data.kodi_runtime,"default")+Label(data.kodi_act,"!='(running)'","-","default")+"</td></tr><tr><td>"+Label(data.rpimonitor_act,"=='(running)'","OK","success")+Label(data.rpimonitor_act,"!='(running)'","KO","danger")+"</td><td><b>rpimonitor</b></td><td>" + data.rpimonitor_desc + "</td><td>"+Label(data.rpimonitor_act,"=='(running)'",data.rpimonitor_runtime,"default")+Label(data.rpimonitor_act,"!='(running)'","-","default")+"</td></tr><tr><td>"+Label(data.smbd_act,"=='(running)'","OK","success")+Label(data.smbd_act,"!='(running)'","KO","danger")+"</td><td><b>smbd</b></td><td>" + data.smbd_desc + "</td><td>"+Label(data.smbd_act,"=='(running)'",data.smbd_runtime,"default")+Label(data.smbd_act,"!='(running)'","-","default")+"</td></tr><tr><td>"+Label(data.sslocal_act,"=='(running)'","OK","success")+Label(data.sslocal_act,"!='(running)'","KO","danger")+"</td><td><b>sslocal</b></td><td>" + data.sslocal_desc + "</td><td>"+Label(data.sslocal_act,"=='(running)'",data.sslocal_runtime,"default")+Label(data.sslocal_act,"!='(running)'","-","default")+"</td></tr><tr><td>"+Label(data.ssh_act,"=='(running)'","OK","success")+Label(data.ssh_act,"!='(running)'","KO","danger")+"</td><td><b>SSH</b></td><td>" + data.ssh_desc + "</td><td>"+Label(data.ssh_act,"=='(running)'",data.ssh_runtime,"default")+Label(data.ssh_act,"!='(running)'","-","default")+"</td></tr><tr><td>"+Label(data.xrdp_act,"=='(running)'","OK","success")+Label(data.xrdp_act,"!='(running)'","KO","danger")+"</td><td><b>xrdp</b></td><td>" + data.xrdp_desc + "</td><td>"+Label(data.xrdp_act,"=='(running)'",data.xrdp_runtime,"default")+Label(data.xrdp_act,"!='(running)'","-","default")+"</td></tr><tr><td>"+Label(data.deluge_daemon_act,"=='(running)'","OK","success")+Label(data.deluge_daemon_act,"!='(running)'","KO","danger")+"</td><td><b>deluge_daemon</b></td><td>" + data.deluge_daemon_desc + "</td><td>"+Label(data.deluge_daemon_act,"=='(running)'",data.deluge_daemon_runtime,"default")+Label(data.deluge_daemon_act,"!='(running)'","-","default")+"</td></tr></table>" -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/arch.conf: -------------------------------------------------------------------------------- 1 | include=/etc/rpimonitor/template/addons.conf 2 | include=/etc/rpimonitor/template/version.conf 3 | include=/etc/rpimonitor/template/uptime.conf 4 | include=/etc/rpimonitor/template/cpu_arch.conf 5 | include=/etc/rpimonitor/template/temperature.conf 6 | include=/etc/rpimonitor/template/memory_arch.conf 7 | include=/etc/rpimonitor/template/swap.conf 8 | include=/etc/rpimonitor/template/sdcard.conf 9 | include=/etc/rpimonitor/template/network.conf 10 | 11 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/cpu.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract CPU information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - cpu frequency - yes - no 6 | # - cpu voltage - yes - no 7 | # - cpu load 1, 5, 15 - yes - yes 8 | # - cpu scaling governor - yes - no 9 | ######################################################################## 10 | dynamic.1.name=cpu_frequency 11 | dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 12 | dynamic.1.regexp=(.*) 13 | dynamic.1.postprocess=$1/1000 14 | dynamic.1.rrd= 15 | snmp.cpu_frequency.id=7 16 | snmp.cpu_frequency.type=integer 17 | snmp.cpu_frequency.description=cpu_frequency 18 | snmp.cpu_frequency.postprocess= 19 | 20 | dynamic.2.name=cpu_voltage 21 | dynamic.2.source=/opt/vc/bin/vcgencmd measure_volts core 22 | dynamic.2.regexp=(\d+.\d+)V 23 | dynamic.2.postprocess= 24 | dynamic.2.rrd= 25 | snmp.cpu_voltage.id=8 26 | snmp.cpu_voltage.type=integer 27 | snmp.cpu_voltage.description=cpu_voltage 28 | snmp.cpu_voltage.postprocess=$1*100 29 | 30 | dynamic.3.name=load1,load5,load15 31 | dynamic.3.source=/proc/loadavg 32 | dynamic.3.regexp=^(\S+)\s(\S+)\s(\S+) 33 | dynamic.3.postprocess= 34 | dynamic.3.rrd=GAUGE 35 | snmp.load1.id=9 36 | snmp.load1.type=integer 37 | snmp.load1.description=load1 38 | snmp.load1.postprocess=$1*100 39 | snmp.load5.id=10 40 | snmp.load5.type=integer 41 | snmp.load5.description=load5 42 | snmp.load5.postprocess=$1*100 43 | snmp.load15.id=11 44 | snmp.load15.type=integer 45 | snmp.load15.description=load15 46 | snmp.load15.postprocess=$1*100 47 | 48 | dynamic.4.name=scaling_governor 49 | dynamic.4.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 50 | dynamic.4.regexp=(.*) 51 | dynamic.4.postprocess= 52 | dynamic.4.rrd= 53 | snmp.scaling_governor.id=12 54 | snmp.scaling_governor.type=string 55 | snmp.scaling_governor.description=scaling_governor 56 | snmp.scaling_governor.postprocess= 57 | 58 | static.1.name=max_proc 59 | static.1.source=nproc 60 | static.1.regexp=(.*) 61 | static.1.postprocess=$1 + 1 62 | 63 | web.status.1.content.1.title="CPU" 64 | web.status.1.content.1.icon=cpu.png 65 | #web.status.1.content.1.line.1="Loads: <b>" + data.load1 + "</b> [1min] - <b>" + data.load5 + "</b> [5min] - <b>" + data.load15 + "</b> [15min]" 66 | web.status.1.content.1.line.1=JustGageBar("Load", "1min", 0, data.load1, data.max_proc, 100, 80)+" "+JustGageBar("Load", "5min", 0, data.load5, data.max_proc, 100, 80)+" "+JustGageBar("Load", "15min", 0, data.load15, data.max_proc, 100, 80) 67 | web.status.1.content.1.line.2="CPU frequency: <b>" + data.cpu_frequency + "MHz</b> Voltage: <b>" + data.cpu_voltage + "V</b>" 68 | web.status.1.content.1.line.3="Scaling governor: <b>" + data.scaling_governor + "</b>" 69 | #web.status.1.content.1.line.4=InsertHTML("./addons/top3/top3.html") 70 | 71 | web.statistics.1.content.1.title="CPU Loads" 72 | web.statistics.1.content.1.graph.1=load1 73 | web.statistics.1.content.1.graph.2=load5 74 | web.statistics.1.content.1.graph.3=load15 75 | web.statistics.1.content.1.ds_graph_options.load1.label=Load 1min 76 | web.statistics.1.content.1.ds_graph_options.load5.label=Load 5min 77 | web.statistics.1.content.1.ds_graph_options.load15.label=Load 15min 78 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/cpu_arch.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract CPU information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - cpu frequency - yes - no 6 | # - cpu voltage - yes - no 7 | # - cpu load 1, 5, 15 - yes - yes 8 | # - cpu scaling governor - yes - no 9 | ######################################################################## 10 | dynamic.1.name=cpu_frequency 11 | dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 12 | dynamic.1.regexp=(.*) 13 | dynamic.1.postprocess=$1/1000 14 | dynamic.1.rrd= 15 | 16 | dynamic.2.name=cpu_voltage 17 | dynamic.2.source=/opt/vc/bin/vcgencmd measure_volts core 18 | dynamic.2.regexp=(\d+.\d+)V 19 | dynamic.2.postprocess= 20 | dynamic.2.rrd= 21 | 22 | dynamic.3.name=load1,load5,load15 23 | dynamic.3.source=/proc/loadavg 24 | dynamic.3.regexp=^(\S+)\s(\S+)\s(\S+) 25 | dynamic.3.postprocess= 26 | dynamic.3.rrd=GAUGE 27 | 28 | dynamic.4.name=scaling_governor 29 | dynamic.4.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 30 | dynamic.4.regexp=(.*) 31 | dynamic.4.postprocess= 32 | dynamic.4.rrd= 33 | 34 | static.1.name=max_proc 35 | static.1.source=nproc 36 | static.1.regexp=(.*) 37 | static.1.postprocess=$1 + 1 38 | 39 | web.status.1.content.1.title="CPU" 40 | web.status.1.content.1.icon=cpu.png 41 | #web.status.1.content.1.line.1="Loads: <b>" + data.load1 + "</b> [1min] - <b>" + data.load5 + "</b> [5min] - <b>" + data.load15 + "</b> [15min]" 42 | web.status.1.content.1.line.1=JustGageBar("Load", "1min", 0, data.load1, data.max_proc, 100, 80)+" "+JustGageBar("Load", "5min", 0, data.load5, data.max_proc, 100, 80)+" "+JustGageBar("Load", "15min", 0, data.load15, data.max_proc, 100, 80) 43 | web.status.1.content.1.line.2="CPU frequency: <b>" + data.cpu_frequency + "MHz</b> Voltage: <b>" + data.cpu_voltage + "V</b>" 44 | web.status.1.content.1.line.3="Scaling governor: <b>" + data.scaling_governor + "</b>" 45 | #web.status.1.content.1.line.4=InsertHTML("/addons/top3/top3.html") 46 | 47 | web.statistics.1.content.1.title="CPU Loads" 48 | web.statistics.1.content.1.graph.1=load1 49 | web.statistics.1.content.1.graph.2=load5 50 | web.statistics.1.content.1.graph.3=load15 51 | web.statistics.1.content.1.ds_graph_options.load1.label=Load 1min 52 | web.statistics.1.content.1.ds_graph_options.load5.label=Load 5min 53 | web.statistics.1.content.1.ds_graph_options.load15.label=Load 15min 54 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/dht11.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract temperature and humidity from DHT11/DHT22 3 | # Page: 2 4 | # Information Status Statistics 5 | # - tempetature - yes - yes 6 | # - humidity - yes - yes 7 | ####################################################################### 8 | # Add new pages (number 2) 9 | web.status.2.name=Living room 10 | web.statistics.2.name=Living room 11 | 12 | # Get dynamic data 13 | dynamic.1.name=living_room_temp 14 | dynamic.1.source=/sys/devices/w1_bus_master1/28-000004fe1847/w1_slave 15 | dynamic.1.regexp=t=(\d+)$ 16 | dynamic.1.postprocess=$1/1000 17 | dynamic.1.rrd=GAUGE 18 | 19 | dynamic.2.name=humidity 20 | dynamic.2.source=Adafruit_DHT 11 27 21 | dynamic.2.regexp=Hum = (\S+) 22 | dynamic.2.postprocess= 23 | dynamic.2.rrd=GAUGE 24 | 25 | # Add a line of status in page number 2 26 | web.status.2.content.1.title="Temperature" 27 | web.status.2.content.1.icon=cpu_temp.png 28 | web.status.2.content.1.line.1="Ambient Temperature: <b>"+data.living_room_temp+"°C</b>" 29 | web.status.2.content.1.line.2="Ambient Humidity: <b>"+data.humidity+"%</b>" 30 | 31 | # Add a statistic graph (with 2 curves suing separate scales) in page number 2 32 | web.statistics.2.content.1.title="Temperature" 33 | web.statistics.2.content.1.graph.1=living_room_temp 34 | web.statistics.2.content.1.graph.2=humidity 35 | web.statistics.2.content.1.ds_graph_options.living_room_temp.label=Ambient temp. (deg C) 36 | web.statistics.2.content.1.ds_graph_options.humidity.label=Humidity (%) 37 | web.statistics.2.content.1.ds_graph_options.humidity.yaxis=2 38 | #web.statistics.2.content.1.graph_options.legend= { position: "sw"} 39 | web.statistics.2.content.1.graph_options.y2axis={ position: "right", min: 0, max: 100 } 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/entropy.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract /dev/random entropy pool size information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - entropy available - no - yes 6 | ####################################################################### 7 | dynamic.1.name=entropy_pool 8 | dynamic.1.source=/proc/sys/kernel/random/entropy_avail 9 | dynamic.1.regexp=(.*) 10 | dynamic.1.postprocess=$1 11 | dynamic.1.rrd=GAUGE 12 | 13 | web.statistics.1.content.1.title="Entropy Pool" 14 | web.statistics.1.content.1.graph.1=entropy_pool 15 | web.statistics.1.content.1.ds_graph_options.entropy_pool.label=Entropy Pool size (Bits) 16 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.addons.conf: -------------------------------------------------------------------------------- 1 | web.addons.1.title="Addons" 2 | web.addons.1.addons=about 3 | 4 | web.addons.2.title="Addons example" 5 | web.addons.2.addons=example 6 | web.addons.2.showTitle=false 7 | 8 | web.addons.3.title="Shellinabox" 9 | web.addons.3.showTitle=false 10 | web.addons.3.addons=custom 11 | web.addons.3.url=https://raspberrypi.local:4200/ 12 | web.addons.3.allowupdate=false 13 | 14 | web.addons.4.title="Webcam - Hawkeye" 15 | web.addons.4.showTitle=false 16 | web.addons.4.addons=custom 17 | web.addons.4.url=http://raspberrypi.local:8000/ 18 | web.addons.4.allowupdate=false 19 | 20 | web.addons.5.title="Custom addons" 21 | web.addons.5.addons=custom 22 | web.addons.5.showTitle=false 23 | web.addons.5.url=/addons/custom/custominfo.html 24 | 25 | web.addons.6.title="Top3" 26 | web.addons.6.addons=top3 -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.alert.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Example how to use Alerts 3 | # 4 | # Page: 1 5 | # Information Status Statistics 6 | # - example static data - yes -yes 7 | # 8 | # Alert too hot if test_alert > 50 9 | # Alert too cold if test_alert < 10 10 | ################################################################################ 11 | 12 | dynamic.1.name=test_alert 13 | dynamic.1.source=/tmp/test_alert 14 | dynamic.1.regexp=(\S+) 15 | dynamic.1.default=37 16 | dynamic.1.rrd=GAUGE 17 | 18 | web.statistics.1.content.1.title="Test alerts" 19 | web.statistics.1.content.1.graph.1=test_alert 20 | web.statistics.1.content.1.ds_graph_options.soc_temp.label=test_alert 21 | 22 | alert.too_hot.active=data.uptime>120 23 | alert.too_hot.trigger=data.test_alert>50 24 | alert.too_hot.maxalertduration=20 25 | alert.too_hot.cancelvalidation=20 26 | alert.too_hot.resendperiod=60 27 | alert.too_hot.raisecommand=echo 'Too hot alert raised data.test_alert>50' > /tmp/test_alert.hot 28 | alert.too_hot.cancelcommand=echo "" > /tmp/test_alert.hot 29 | 30 | alert.too_cold.active=data.uptime>120 31 | alert.too_cold.trigger=data.test_alert<10 32 | alert.too_cold.maxalertduration=20 33 | alert.too_cold.cancelvalidation=20 34 | alert.too_cold.resendperiod=60 35 | alert.too_cold.raisecommand=echo 'Too cold alert raised raised data.test_alert<10' > /tmp/test_alert.cold 36 | alert.too_cold.cancelcommand=echo "" > /tmp/test_alert.cold 37 | 38 | web.status.1.content.1.title="Alerts" 39 | web.status.1.content.1.icon=daemons.png 40 | web.status.1.content.1.line.1="Test temperature: "+data.test_alert 41 | web.status.1.content.1.line.2="Too hot: "+Label(data.alert.too_hot.alertstate,"==0","Everything is OK","success")+" "+Label(data.alert.too_hot.alertstate,"==1","Houston we have a problem: "+data.test_alert+">50","warning")+" "+Label(data.alert.too_hot.lastsendalertdate,"!=0","Alert is on going","danger") 42 | web.status.1.content.1.line.3="Too cold: "+Label(data.alert.too_cold.alertstate,"==0","Everything is OK","success")+" "+Label(data.alert.too_cold.alertstate,"==1","Houston we have a problem: "+data.test_alert+"<10","warning")+" "+Label(data.alert.too_cold.lastsendalertdate,"!=0","Alert is on going","danger") 43 | 44 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.badge_and_label.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Example showing usage of labels (also applicable for badges) 3 | # Page 1: 4 | # Information Status Statistics 5 | # - ssh service active - yes -no 6 | # - rpimonitor service active - yes -no 7 | # - http service active - yes -no 8 | # - https service active - yes -no 9 | ######################################################################## 10 | dynamic.1.name=ssh 11 | dynamic.1.source=netstat -nlt 12 | dynamic.1.regexp=tcp .*:(22).*LISTEN 13 | dynamic.1.default=0 14 | 15 | dynamic.2.name=rpimonitor 16 | dynamic.2.source=netstat -nlt 17 | dynamic.2.regexp=tcp .*:(8888).*LISTEN 18 | dynamic.2.default=0 19 | 20 | dynamic.3.name=http 21 | dynamic.3.source=netstat -nlt 22 | dynamic.3.regexp=tcp .*:(80).*LISTEN 23 | dynamic.3.default=0 24 | 25 | dynamic.4.name=https 26 | dynamic.4.source=netstat -nlt 27 | dynamic.4.regexp=tcp .*:(443).*LISTEN 28 | dynamic.4.default=0 29 | 30 | web.status.1.content.1.title="Servers" 31 | web.status.1.content.1.icon=daemons.png 32 | web.status.1.content.1.line.1="<b>ssh</b> : "+Label(data.ssh,"==22","OK","label-success")+Label(data.ssh,"!=22","KO","label-danger") 33 | web.status.1.content.1.line.2="<b>rpimonitor</b> : "+Label(data.rpimonitor,"==8888","OK","label-success")+Label(data.rpimonitor,"!=8888","KO","label-danger") 34 | web.status.1.content.1.line.3="<b>nginx http</b> : "+Label(data.http,"==80","OK","label-success")+Label(data.http,"!=80","KO","label-danger") 35 | web.status.1.content.1.line.4="<b>nginx https</b> : "+Label(data.https,"==443","OK","label-success")+Label(data.https,"!=443","KO","label-danger") 36 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.friends.conf: -------------------------------------------------------------------------------- 1 | web.friends.1.title="Raspberry Pi" 2 | web.friends.1.link=http://192.168.0.123:8888/ 3 | web.friends.2.title="Shuttle" 4 | web.friends.2.link=http://192.168.0.2:8888/ 5 | web.friends.3.title="Netbook" 6 | web.friends.3.link=http://192.168.0.38:8888/ -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.header.conf: -------------------------------------------------------------------------------- 1 | web.page.icon='img/avatar.png' 2 | web.page.menutitle='XB-Monitor <sub>('+data.hostname+')</sub>' 3 | web.page.pagetitle='XB-Monitor ('+data.hostname+')' -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.interval.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Example how to use interval for data extraction 3 | # Page: 1 4 | # Information Status Statistics 5 | # - Show date with interval=1 -yes -no 6 | # - Show date with interval=3 -yes -no 7 | # - Show date with interval=7 -yes -no 8 | ######################################################################## 9 | dynamic.1.name=interval1 10 | dynamic.1.source=date 11 | dynamic.1.regexp=(.*) 12 | 13 | dynamic.2.name=interval3 14 | dynamic.2.source=date 15 | dynamic.2.regexp=(.*) 16 | dynamic.2.interval=3 17 | 18 | dynamic.3.name=interval7 19 | dynamic.3.source=date 20 | dynamic.3.regexp=(.*) 21 | dynamic.3.interval=7 22 | 23 | web.status.1.content.1.title="Interval" 24 | web.status.1.content.1.icon=version.png 25 | web.status.1.content.1.line.1='Interval=1 last update at <b>'+data.interval1+'</b>' 26 | web.status.1.content.1.line.2='Interval=3 last update at <b>'+data.interval3+'</b>' 27 | web.status.1.content.1.line.3='Interval=7 last update at <b>'+data.interval7+'</b>' 28 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.justgage.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Example how to use JustGageBar in status page 3 | # Page: 1 4 | # Information Status Statistics 5 | # - example with static data - yes -no 6 | ######################################################################## 7 | web.status.1.content.1.title="JustGageBar" 8 | web.status.1.content.1.icon=version.png 9 | web.status.1.content.1.line.1='<b>JustGageBar default configuration</b>' 10 | web.status.1.content.1.line.2=JustGageBar("Normal", "No Colors",0, 25, 100)+" "+JustGageBar("Warning", "No Colors",0, 50, 100)+" "+JustGageBar("Critical", "No Colors",0, 75, 100) 11 | web.status.1.content.1.line.3='<b>JustGageBar custom colors</b>' 12 | web.status.1.content.1.line.4=JustGageBar("Normal", "Colors",0, 25, 100,100,80,[ "#0ba9d7", "#02f9c8", "#00ff00" ])+" "+JustGageBar("Warning", "Colors",0, 50, 100,100,80,[ "#0ba9d7", "#02f9c8", "#00ff00" ])+" "+JustGageBar("Critical", "Colors",0, 75, 100,100,80,[ "#0ba9d7", "#02f9c8", "#00ff00" ]) 13 | web.status.1.content.1.line.5='<b>JustGageBar custom level for warning and critical level</b>' 14 | web.status.1.content.1.line.6=JustGageBar("Normal", "WarnCrit",0, 5, 100,100,80,percentColors,10,50)+" "+JustGageBar("Warning", "WarnCrit",0, 15, 100,100,80,percentColors,10,50)+" "+JustGageBar("Critical", "WarnCrit",0, 51, 100,100,80,percentColors,10,50) 15 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.multipage.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Example how to use JustGageBar in status page 3 | # Page: 1 4 | # Information Status Statistics 5 | # - random data - yes -yes 6 | # Page: 2 7 | # Information Status Statistics 8 | # - random data - yes -yes 9 | ######################################################################## 10 | web.status.1.title="Status 1" 11 | web.statistics.1.title="Statistics 1" 12 | web.status.2.title="Status 2" 13 | web.statistics.2.title="Statistics 2" 14 | 15 | dynamic.1.name=data1 16 | dynamic.1.source=od -vAn -N2 -tu2 < /dev/urandom 17 | dynamic.1.regexp=(\d+) 18 | dynamic.1.postprocess=$1%100 19 | dynamic.1.rrd=GAUGE 20 | 21 | dynamic.2.name=data2 22 | dynamic.2.source=od -vAn -N2 -tu2 < /dev/random 23 | dynamic.2.regexp=(\d+) 24 | dynamic.2.postprocess=$1%100 25 | dynamic.2.rrd=GAUGE 26 | 27 | web.status.1.content.1.title="Data 1" 28 | web.status.1.content.1.icon=cpu_temp.png 29 | web.status.1.content.1.line.1="data1: <b>"+data.data1+"</b>" 30 | 31 | web.statistics.1.content.1.title="Data 1" 32 | web.statistics.1.content.1.graph.1=data1 33 | web.statistics.1.content.1.ds_graph_options.living_room_temp.label=Data 1 34 | 35 | web.status.2.content.1.title=LinkToGraph(1,0,"Data 2") 36 | web.status.2.content.1.icon=cpu_temp.png 37 | web.status.2.content.1.line.1="data1: <b>"+data.data2+"</b>" 38 | 39 | web.statistics.2.content.1.title="Data 2" 40 | web.statistics.2.content.1.graph.1=data2 41 | web.statistics.2.content.1.ds_graph_options.living_room_temp.label=Data 2 -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.postprocess_default.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract CPU information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - cpu frequency - yes - no 6 | # - cpu voltage - yes - no 7 | # - cpu load 1, 5, 15 - yes - yes 8 | # - cpu scaling governor - yes - no 9 | ######################################################################## 10 | dynamic.1.name=load1,load5,load15 11 | dynamic.1.source=/proc/loadavg 12 | dynamic.1.regexp=^(\S+)\s(\S+)\s(\S+) 13 | dynamic.1.postprocess= 14 | 15 | dynamic.2.name=pload1,pload5,pload15 16 | dynamic.2.source=/proc/loadavg 17 | dynamic.2.regexp=^(\S+)\s(\S+)\s(\S+) 18 | dynamic.2.postprocess=$1*100,$1*100,$1*100 19 | 20 | dynamic.3.name=default1,default2,default3 21 | dynamic.3.default=1,2,3 22 | 23 | dynamic.4.name=test0 24 | dynamic.4.source=echo 0 25 | dynamic.4.postprocess=$1+1 26 | 27 | dynamic.5.name=test00 28 | dynamic.5.source=echo 0 29 | dynamic.5.default=5 30 | 31 | web.status.1.content.1.title="CPU" 32 | web.status.1.content.1.icon=cpu.png 33 | web.status.1.content.1.line.1="Loads: <b>" + data.load1 + "</b> [1min] - <b>" + data.load5 + "</b> [5min] - <b>" + data.load15 + "</b> [15min]" 34 | web.status.1.content.1.line.2="100 x Loads: <b>" + data.pload1 + "</b> [1min] - <b>" + data.pload5 + "</b> [5min] - <b>" + data.pload15 + "</b> [15min]" 35 | web.status.1.content.1.line.3="Default: <b>" + data.default1 + "</b> - <b>" + data.default2 + "</b> - <b>" + data.default3 + "</b> " 36 | web.status.1.content.1.line.4="Test 0: <b>" + data.test0 + "</b> - <b>" + data.test00 37 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.progressbar.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Example how to use progressbar in status page 3 | # Page: 1 4 | # Information Status Statistics 5 | # - static data - yes -no 6 | ######################################################################## 7 | web.status.1.content.1.title="ProgressBar" 8 | web.status.1.content.1.icon=version.png 9 | web.status.1.content.1.line.1='<b>ProgressBar without warning or critical</b>' 10 | web.status.1.content.1.line.2=ProgressBar(33, 100) 11 | web.status.1.content.1.line.3='<b>ProgressBar with warning lower than critical (Example: disk usage)</b>' 12 | web.status.1.content.1.line.4=ProgressBar(10, 100, 33, 66) 13 | web.status.1.content.1.line.5=ProgressBar(50, 100, 33, 66) 14 | web.status.1.content.1.line.6=ProgressBar(75, 100, 33, 66) 15 | web.status.1.content.1.line.7='<b>ProgressBar with warning higher than critical (Example: ink cartridge)</b>' 16 | web.status.1.content.1.line.8=ProgressBar(75, 100, 66, 33) 17 | web.status.1.content.1.line.9=ProgressBar(50, 100, 66, 33) 18 | web.status.1.content.1.line.10=ProgressBar(10, 100, 66, 33) 19 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/example.visibility.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Example how to manage visibility of status information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - visibility - yes - no 6 | # This proof of concept is behaving has follow: 7 | # If minute number is odd the row is visible 8 | # If minute number is even the row is hidden 9 | # The parameter visibility should be a valid javascript formula returning 10 | # - 0 to hide the row 11 | # - anything else but 0 to show the row 12 | ######################################################################## 13 | dynamic.1.name=visibility 14 | dynamic.1.source=date +"%M" 15 | dynamic.1.regexp=(.*) 16 | dynamic.1.postprocess=$1%2 17 | dynamic.1.rrd= 18 | 19 | web.status.1.content.1.title="Visibility" 20 | web.status.1.content.1.icon=version.png 21 | web.status.1.content.1.visibility=data.visibility 22 | web.status.1.content.1.line.1='Visibility: <b>Control row visibility</b>' 23 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/memory.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Memory information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - memory total - yes - yes 6 | # - memory free - yes - yes 7 | # - memory available - yes - yes 8 | ######################################################################## 9 | static.1.name=memory_total 10 | static.1.source=/proc/meminfo 11 | static.1.regexp=MemTotal:\s+(\d+) 12 | static.1.postprocess=$1/1024 13 | 14 | dynamic.1.name=memory_free 15 | dynamic.1.source=/proc/meminfo 16 | dynamic.1.regexp=MemFree:\s+(\d+) 17 | dynamic.1.postprocess=$1/1024 18 | dynamic.1.rrd=GAUGE 19 | 20 | dynamic.2.name=memory_available 21 | dynamic.2.source=/proc/meminfo 22 | dynamic.2.regexp=MemAvailable:\s+(\d+) 23 | dynamic.2.postprocess=$1/1024 24 | dynamic.2.rrd=GAUGE 25 | 26 | web.status.1.content.1.title="Memory" 27 | web.status.1.content.1.icon=memory.png 28 | web.status.1.content.1.line.1="Used: <b>" + KMG(data.memory_total-data.memory_available,'M') + "</b> (<b>" + Percent(data.memory_total-data.memory_available,data.memory_total,'M') + "</b>) Available: <b>" + KMG(data.memory_available,'M') + "</b> Total: <b>" + KMG(data.memory_total,'M') + "</b>" 29 | web.status.1.content.1.line.2=ProgressBar(data.memory_total-data.memory_available,data.memory_total) 30 | 31 | web.statistics.1.content.1.title="Memory" 32 | web.statistics.1.content.1.graph.1=memory_total 33 | web.statistics.1.content.1.graph.2=memory_free 34 | web.statistics.1.content.1.graph.3=memory_available 35 | web.statistics.1.content.1.ds_graph_options.memory_total.label=Total Memory(MB) 36 | web.statistics.1.content.1.ds_graph_options.memory_free.label=Free Memory (MB) 37 | web.statistics.1.content.1.ds_graph_options.memory_free.color="#7777FF" 38 | web.statistics.1.content.1.ds_graph_options.memory_available.label=Available Memory (MB) 39 | web.statistics.1.content.1.ds_graph_options.memory_available.color="#77FF77" 40 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/memory_arch.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Memory information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - memory total - yes - yes 6 | # - memory free - yes - yes 7 | # - memory available - yes - yes 8 | ######################################################################## 9 | static.1.name=memory_total 10 | static.1.source=/proc/meminfo 11 | static.1.regexp=MemTotal:\s+(\d+) 12 | static.1.postprocess=$1/1024 13 | 14 | dynamic.1.name=memory_free 15 | dynamic.1.source=/proc/meminfo 16 | dynamic.1.regexp=MemFree:\s+(\d+) 17 | dynamic.1.postprocess=$1/1024 18 | dynamic.1.rrd=GAUGE 19 | 20 | dynamic.2.name=memory_available 21 | dynamic.2.source=/proc/meminfo 22 | dynamic.2.regexp=MemAvailable:\s+(\d+) 23 | dynamic.2.postprocess=$1/1024 24 | dynamic.2.rrd=GAUGE 25 | 26 | web.status.1.content.1.title="Memory" 27 | web.status.1.content.1.icon=memory.png 28 | web.status.1.content.1.line.1="Used: <b>" + KMG(data.memory_total-data.memory_available,'M') + "</b> (<b>" + Percent(data.memory_total-data.memory_available,data.memory_total,'M') + "</b>) Available: <b>" + KMG(data.memory_available,'M') + "</b> Total: <b>" + KMG(data.memory_total,'M') + "</b>" 29 | web.status.1.content.1.line.2=ProgressBar(data.memory_total-data.memory_available,data.memory_total) 30 | 31 | web.statistics.1.content.2.title="Memory" 32 | web.statistics.1.content.2.graph.1=memory_total 33 | web.statistics.1.content.2.graph.2=memory_free 34 | web.statistics.1.content.2.graph.3=memory_available 35 | web.statistics.1.content.2.ds_graph_options.memory_total.label=Total Memory(MB) 36 | web.statistics.1.content.2.ds_graph_options.memory_free.label=Free Memory (MB) 37 | web.statistics.1.content.2.ds_graph_options.memory_free.color="#7777FF" 38 | web.statistics.1.content.2.ds_graph_options.memory_available.label=Available Memory (MB) 39 | web.statistics.1.content.2.ds_graph_options.memory_available.color="#77FF77" 40 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/memory_legacy.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Memory information for kernel < 3.14 3 | # Page: 1 4 | # Information Status Statistics 5 | # - memory total - yes - yes 6 | # - memory free - yes - yes 7 | # - memory available - no - no 8 | # 9 | # Used memory is calculated like in HTOP 10 | # (see https://stackoverflow.com/questions/41224738/how-to-calculate-system-memory-usage-from-proc-meminfo-like-htop) 11 | # 12 | ######################################################################## 13 | static.1.name=memory_total 14 | static.1.source=/proc/meminfo 15 | static.1.regexp=MemTotal:\s+(\d+) 16 | static.1.postprocess=$1/1024 17 | 18 | dynamic.1.name=memory_free 19 | dynamic.1.source=/proc/meminfo 20 | dynamic.1.regexp=MemFree:\s+(\d+) 21 | dynamic.1.postprocess=$1/1024 22 | dynamic.1.rrd=GAUGE 23 | 24 | dynamic.2.name=buffers 25 | dynamic.2.source=/proc/meminfo 26 | dynamic.2.regexp=Buffers:\s+(\d+) 27 | dynamic.2.postprocess=$1/1024 28 | #dynamic.2.rrd=GAUGE 29 | 30 | dynamic.3.name=sreclaimable 31 | dynamic.3.source=/proc/meminfo 32 | dynamic.3.regexp=SReclaimable:\s+(\d+) 33 | dynamic.3.postprocess=$1/1024 34 | #dynamic.3.rrd=GAUGE 35 | 36 | dynamic.4.name=shmem 37 | dynamic.4.source=/proc/meminfo 38 | dynamic.4.regexp=Shmem:\s+(\d+) 39 | dynamic.4.postprocess=$1/1024 40 | #dynamic.4.rrd=GAUGE 41 | 42 | dynamic.5.name=memory_available 43 | dynamic.5.source=/proc/meminfo 44 | dynamic.5.regexp=^Cached:\s+(\d+) 45 | dynamic.5.postprocess=$this->{'dynamic'}->{'memory_free'} + $this->{'dynamic'}->{'buffers'} + ($1/1024) + $this->{'dynamic'}->{'sreclaimable'} - $this->{'dynamic'}->{'shmem'} 46 | # Meaning: Used = Total-Free-Buffers-Cached-SReclaimable+Shmem 47 | dynamic.5.rrd=GAUGE 48 | 49 | web.status.1.content.1.title="Memory" 50 | web.status.1.content.1.icon=memory.png 51 | web.status.1.content.1.line.1="Used: <b>" + KMG(data.memory_total-data.memory_available,'M') + "</b> (<b>" + Percent(data.memory_total-data.memory_available,data.memory_total,'M') + "</b>) Free: <b>" + KMG(data.memory_free,'M') + "</b> Total: <b>" + KMG(data.memory_total,'M') + "</b>" 52 | web.status.1.content.1.line.2=ProgressBar(data.memory_total-data.memory_available,data.memory_total) 53 | 54 | web.statistics.1.content.1.title="Memory" 55 | web.statistics.1.content.1.graph.1=memory_total 56 | web.statistics.1.content.1.graph.2=memory_free 57 | web.statistics.1.content.1.graph.3=memory_available 58 | web.statistics.1.content.1.ds_graph_options.memory_total.label=Total Memory(MB) 59 | web.statistics.1.content.1.ds_graph_options.memory_free.label=Free Memory (MB) 60 | web.statistics.1.content.1.ds_graph_options.memory_free.color="#7777FF" 61 | web.statistics.1.content.1.ds_graph_options.memory_available.label=Available Memory (MB) 62 | web.statistics.1.content.1.ds_graph_options.memory_available.color="#77FF77" 63 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/network.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Network information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - recieved - yes - yes 6 | # - send - yes - yes 7 | # 8 | # Note: Replace 'eth0' in the configuration bellow by the name of your 9 | # network interface and uncomment the line according to your needs 10 | ######################################################################## 11 | dynamic.1.name=net_received 12 | dynamic.1.source=/sys/class/net/eth0/statistics/rx_bytes 13 | dynamic.1.regexp=(.*) 14 | dynamic.1.postprocess=$1*-1 15 | dynamic.1.rrd=DERIVE 16 | dynamic.1.max=0 17 | 18 | dynamic.2.name=net_send 19 | dynamic.2.source=/sys/class/net/eth0/statistics/tx_bytes 20 | dynamic.2.regexp=(.*) 21 | dynamic.2.postprocess= 22 | dynamic.2.rrd=DERIVE 23 | dynamic.2.min=0 24 | 25 | web.status.1.content.1.title="Network" 26 | web.status.1.content.1.icon=network.png 27 | web.status.1.content.1.line.1="Ethernet Sent: <b>"+KMG(data.net_send)+"<i class='icon-arrow-up'></i></b> Received: <b>"+KMG(Math.abs(data.net_received)) + "<i class='icon-arrow-down'></i></b>" 28 | 29 | web.statistics.1.content.1.title="Network" 30 | web.statistics.1.content.1.graph.1=net_send 31 | web.statistics.1.content.1.graph.2=net_received 32 | web.statistics.1.content.1.graph_options.yaxis={ tickFormatter: function (v) { if (Math.abs(v) > 1048576) return (Math.round(v*10/1024/1024)/10) + " MiB/s" ; if (Math.abs(v) > 1024) return (Math.round(v*10/1024)/10) + " KiB/s" ; else return v + " B/s" }, } 33 | web.statistics.1.content.1.ds_graph_options.net_send.label=Upload bandwidth (bytes) 34 | web.statistics.1.content.1.ds_graph_options.net_send.lines={ fill: true } 35 | web.statistics.1.content.1.ds_graph_options.net_send.color="#FF7777" 36 | web.statistics.1.content.1.ds_graph_options.net_received.label=Download bandwidth (bytes) 37 | web.statistics.1.content.1.ds_graph_options.net_received.lines={ fill: true } 38 | web.statistics.1.content.1.ds_graph_options.net_received.color="#77FF77" 39 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/printer.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Printer information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - copie - yes - yes 6 | # - magenta - yes - yes 7 | # - cyan - yes - yes 8 | # - yellow - yes - yes 9 | # - black - yes - yes 10 | # 11 | # Note: snmp is required to get number of copies. 12 | # sudo apt-get install snmp 13 | ######################################################################## 14 | dynamic.1.name=copies 15 | dynamic.1.source=snmpget -On -v2c -cpublic 192.168.0.14 .1.3.6.1.2.1.43.10.2.1.4.1.1 16 | dynamic.1.regexp=.* (\d+)$ 17 | dynamic.1.postprocess= 18 | dynamic.1.rrd=GAUGE 19 | 20 | dynamic.2.name=magenta 21 | dynamic.2.source=wget http://192.168.0.14/general/status.html -o /dev/null -O /dev/stdout 22 | dynamic.2.regexp=Magenta.*height="(\d+)px.*Cyan 23 | dynamic.2.postprocess= 24 | dynamic.2.rrd=GAUGE 25 | 26 | dynamic.3.name=cyan 27 | dynamic.3.source=wget http://192.168.0.14/general/status.html -o /dev/null -O /dev/stdout 28 | dynamic.3.regexp=Cyan.*height="(\d+)px.*Yellow 29 | dynamic.3.postprocess= 30 | dynamic.3.rrd=GAUGE 31 | 32 | dynamic.4.name=yellow 33 | dynamic.4.source=wget http://192.168.0.14/general/status.html -o /dev/null -O /dev/stdout 34 | dynamic.4.regexp=Yellow.*height="(\d+)px.*Black 35 | dynamic.4.postprocess= 36 | dynamic.4.rrd=GAUGE 37 | 38 | dynamic.5.name=black 39 | dynamic.5.source=wget http://192.168.0.14/general/status.html -o /dev/null -O /dev/stdout 40 | dynamic.5.regexp=Black.*height="(\d+)px" 41 | dynamic.5.postprocess= 42 | dynamic.5.rrd=GAUGE 43 | 44 | web.status.1.content.1.title="Printer" 45 | web.status.1.content.1.icon=printer.png 46 | web.status.1.content.1.line.1="Number of copy: <b>"+data.copies+"</b>" 47 | web.status.1.content.1.line.2="<b>Black ("+Percent(data.black,55)+")</b>" 48 | web.status.1.content.1.line.3=ProgressBar(data.black,55) 49 | web.status.1.content.1.line.4="<b>Magenta ("+Percent(data.magenta,55)+")</b>" 50 | web.status.1.content.1.line.5=ProgressBar(data.magenta,55) 51 | web.status.1.content.1.line.6="<b>Cyan ("+Percent(data.cyan,55)+")</b>" 52 | web.status.1.content.1.line.7=ProgressBar(data.cyan,55) 53 | web.status.1.content.1.line.8="<b>Yellow ("+Percent(data.yellow,55)+")</b>" 54 | web.status.1.content.1.line.9=ProgressBar(data.yellow,55) 55 | 56 | web.statistics.1.content.1.title="Printer" 57 | web.statistics.1.content.1.graph.1=copies 58 | web.statistics.1.content.1.graph.2=black 59 | web.statistics.1.content.1.graph.3=magenta 60 | web.statistics.1.content.1.graph.4=cyan 61 | web.statistics.1.content.1.graph.5=yellow 62 | web.statistics.1.content.1.ds_graph_options.copies.color="#00FF00" 63 | web.statistics.1.content.1.ds_graph_options.black.color="#000000" 64 | web.statistics.1.content.1.ds_graph_options.magenta.color="#FF0000" 65 | web.statistics.1.content.1.ds_graph_options.cyan.color="#0000FF" 66 | web.statistics.1.content.1.ds_graph_options.yellow.color="#FFFF00" 67 | web.statistics.1.content.1.ds_graph_options.copies.yaxis=2 68 | web.statistics.1.content.1.graph_options.y2axis={ position: "right" } 69 | web.statistics.1.content.1.graph_options.legend= { position: "se"} 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/raspbian.conf: -------------------------------------------------------------------------------- 1 | #include=/etc/rpimonitor/template/example.friends.conf 2 | #include=/etc/rpimonitor/template/example.header.conf 3 | #include=/etc/rpimonitor/template/example.addons.conf 4 | #include=/etc/rpimonitor/template/example.justgage.conf 5 | #include=/etc/rpimonitor/template/example.badge_and_label.conf 6 | #include=/etc/rpimonitor/template/example.progressbar.conf 7 | #include=/etc/rpimonitor/template/example.visibility.conf 8 | #include=/etc/rpimonitor/template/example.alert.conf 9 | #include=/etc/rpimonitor/template/example.interval.conf 10 | #include=/etc/rpimonitor/template/example.multipage.conf 11 | 12 | include=/etc/rpimonitor/template/addons.conf 13 | include=/etc/rpimonitor/template/version.conf 14 | include=/etc/rpimonitor/template/uptime.conf 15 | include=/etc/rpimonitor/template/cpu.conf 16 | include=/etc/rpimonitor/template/temperature.conf 17 | include=/etc/rpimonitor/template/memory.conf 18 | include=/etc/rpimonitor/template/swap.conf 19 | include=/etc/rpimonitor/template/sdcard.conf 20 | include=/etc/rpimonitor/template/network.conf 21 | 22 | #include=/etc/rpimonitor/template/printer.conf 23 | #include=/etc/rpimonitor/template/storage.conf 24 | #include=/etc/rpimonitor/template/services.conf 25 | #include=/etc/rpimonitor/template/chrony.conf 26 | #include=/etc/rpimonitor/template/wlan.conf 27 | #include=/etc/rpimonitor/template/dht11.conf 28 | #include=/etc/rpimonitor/template/entropy.conf 29 | 30 | #include=/etc/rpimonitor/template/weather.conf 31 | 32 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/raspbmc.conf: -------------------------------------------------------------------------------- 1 | include=/etc/rpimonitor/template/version.conf 2 | include=/etc/rpimonitor/template/uptime.conf 3 | include=/etc/rpimonitor/template/cpu.conf 4 | include=/etc/rpimonitor/template/temperature.conf 5 | include=/etc/rpimonitor/template/memory.conf 6 | include=/etc/rpimonitor/template/sdcard_raspbmc.conf 7 | include=/etc/rpimonitor/template/network.conf 8 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/rclone.conf: -------------------------------------------------------------------------------- 1 | # Source 2 | # https://github.com/henriqueutsch/RPi-Monitor/commit/dd20c61cbf5061c931acfd24f27015ff638a1c52 3 | # 4 | # Install Rclone 5 | # http://rclone.org/install/ 6 | # 7 | # Configure Rclone 8 | # http://linoxide.com/file-system/configure-rclone-linux-sync-cloud/ 9 | # 10 | # Use nohup to run a command like a process (this command generate the output in a nohup.out file 11 | # nohup rclone sync -v --transfers 50 --ignore-existing YourGoogleDrive: /media/MountedDrive/ & 12 | # 13 | # http://icons.iconarchive.com/icons/marcus-roberto/google-play/64/Google-Drive-icon.png 14 | # 15 | ############################################################################################################# 16 | dynamic.1.name=rclone_transferred 17 | dynamic.1.source=cat /media/Drive5T/nohup.out | grep 'Transferred' | tail -2 | grep -m1 "" | gawk '{print $2}' 18 | 19 | dynamic.2.name=rclone_errors 20 | dynamic.2.source=cat /media/Drive5T/nohup.out | grep 'Errors' | tail -1| gawk '{print $2}' 21 | dynamic.2.rrd=DERIVE 22 | 23 | dynamic.3.name=rclone_checks 24 | dynamic.3.source=cat /media/Drive5T/nohup.out | grep 'Checks' | tail -1| gawk '{print $2}' 25 | dynamic.3.rrd=DERIVE 26 | 27 | dynamic.4.name=rclone_files 28 | dynamic.4.source=cat /media/Drive5T/nohup.out | grep 'Transferred' | tail -1| gawk '{print $2}' 29 | dynamic.4.rrd=DERIVE 30 | 31 | dynamic.5.name=rclone_time 32 | dynamic.5.source=cat /media/Drive5T/nohup.out | grep 'Elapsed' | tail -1| gawk '{print $3}' 33 | dynamic.5.rrd=DERIVE 34 | 35 | web.status.1.content.1.title="Rclone" 36 | web.status.1.content.1.icon=Google-Drive-icon.png 37 | web.status.1.content.1.line.1="<b>Transferred: </b>"+KMG(data.rclone_transferred, 'G') 38 | web.status.1.content.1.line.2="<b>Errors: </b>"+Pad(data.rclone_errors) 39 | web.status.1.content.1.line.3="<b>Checks: </b>"+Pad(data.rclone_checks) 40 | web.status.1.content.1.line.4="<b>Files: </b>"+Pad(data.rclone_files) 41 | web.status.1.content.1.line.5="<b>Elapsed Time: </b>"+data.rclone_time 42 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/remote_service.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract information about Opened Port in remote computer 3 | # Page: 1 4 | # Information Status Statistics 5 | # - ssh port (22) - yes - no 6 | # - rpimonotor port (8888) - yes - no 7 | # - http port (80) - yes - yes 8 | # - https port (443) - yes - yes 9 | # - mysql port (3306) - yes - no 10 | # 11 | # Requires nmap, you can install with 'sudo apt-get install nmap' 12 | ######################################################################## 13 | dynamic.1.name=ssh 14 | dynamic.1.source=nmap -sT remote.server -p 22 | grep -o open 15 | dynamic.1.regexp=(.*) 16 | dynamic.1.default=0 17 | 18 | dynamic.2.name=http 19 | dynamic.2.source=nmap -sT remote.server -p 80 | grep -o open 20 | dynamic.2.regexp=(.*) 21 | dynamic.2.default=0 22 | 23 | dynamic.3.name=https 24 | dynamic.3.source=nmap -sT remote.server -p 443 | grep -o open 25 | dynamic.3.regexp=(.*) 26 | dynamic.3.default=0 27 | 28 | dynamic.4.name=mysql 29 | dynamic.4.source=nmap -sT remote.server -p 3306 | grep -o open 30 | dynamic.4.regexp=(.*) 31 | dynamic.4.default=0 32 | 33 | web.status.1.content.1.title="Remote Servers" 34 | web.status.1.content.1.icon=daemons.png 35 | web.status.1.content.1.line.1="<b>ssh</b> : "+Label(data.ssh,"==22","OK","success")+Label(data.ssh,"!=22","KO","danger") 36 | web.status.1.content.1.line.3="<b>http</b> : "+Label(data.http,"==80","OK","success")+Label(data.http,"!=80","KO","danger") 37 | web.status.1.content.1.line.4="<b>https</b> : "+Label(data.https,"==443","OK","success")+Label(data.https,"!=443","KO","danger") 38 | web.status.1.content.1.line.1="<b>mysql</b> : "+Label(data.mysql,"==3306","OK","success")+Label(data.mysql,"!=3306","KO","danger") 39 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/sdcard.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract SDCard information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - root total - yes - yes 6 | # - root used - yes - yes 7 | # - boot total - yes - yes 8 | # - boot used - yes - yes 9 | ######################################################################## 10 | static.1.name=sdcard_root_total 11 | static.1.source=df / 12 | static.1.regexp=\S+\s+(\d+).*\/$ 13 | static.1.postprocess=$1/1024 14 | 15 | static.2.name=sdcard_boot_total 16 | static.2.source=df /boot 17 | static.2.regexp=\S+\s+(\d+).*\/boot$ 18 | static.2.postprocess=$1/1024 19 | 20 | dynamic.1.name=sdcard_root_used 21 | dynamic.1.source=df / 22 | dynamic.1.regexp=\S+\s+\d+\s+(\d+).*\/$ 23 | dynamic.1.postprocess=$1/1024 24 | dynamic.1.rrd=GAUGE 25 | 26 | dynamic.2.name=sdcard_boot_used 27 | dynamic.2.source=df /boot 28 | dynamic.2.regexp=\S+\s+\d+\s+(\d+).*\/boot$ 29 | dynamic.2.postprocess=$1/1024 30 | dynamic.2.rrd=GAUGE 31 | 32 | web.status.1.content.1.title="SD card" 33 | web.status.1.content.1.icon=sd.png 34 | web.status.1.content.1.line.1="<b>/boot</b> Used: <b>"+KMG(data.sdcard_boot_used,'M')+"</b> (<b>"+Percent(data.sdcard_boot_used,data.sdcard_boot_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_boot_total-data.sdcard_boot_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_boot_total,'M') +"</b>" 35 | web.status.1.content.1.line.2=ProgressBar(data.sdcard_boot_used,data.sdcard_boot_total,60,80) 36 | web.status.1.content.1.line.3="<b>/</b> Used: <b>"+KMG(data.sdcard_root_used,'M') + "</b> (<b>" + Percent(data.sdcard_root_used,data.sdcard_root_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_root_total-data.sdcard_root_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_root_total,'M') + "</b>" 37 | web.status.1.content.1.line.4=ProgressBar(data.sdcard_root_used,data.sdcard_root_total,60,80) 38 | 39 | web.statistics.1.content.1.title="Disks - boot" 40 | web.statistics.1.content.1.graph.1=sdcard_boot_total 41 | web.statistics.1.content.1.graph.2=sdcard_boot_used 42 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_total.label=Size of /boot (MB) 43 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_total.color="#FF7777" 44 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.label=Used on /boot (MB) 45 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.lines={ fill: true } 46 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.color="#7777FF" 47 | 48 | web.statistics.1.content.2.title="Disks - root" 49 | web.statistics.1.content.2.graph.1=sdcard_root_total 50 | web.statistics.1.content.2.graph.2=sdcard_root_used 51 | web.statistics.1.content.2.ds_graph_options.sdcard_root_total.label=Size of / (MB) 52 | web.statistics.1.content.2.ds_graph_options.sdcard_root_total.color="#FF7777" 53 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.label=Used on / (MB) 54 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.lines={ fill: true } 55 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.color="#7777FF" 56 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/sdcard_raspbmc.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract SDCard information for Raspbmc 3 | # Page: 1 4 | # Information Status Statistics 5 | # - root total - yes - yes 6 | # - root used - yes - yes 7 | # - boot total - yes - yes 8 | # - boot used - yes - yes 9 | ######################################################################## 10 | static.1.name=sdcard_root_total 11 | static.1.source=df -t ext4 12 | static.1.regexp=mmcblk0p.\s+(\d+).*\/$ 13 | static.1.postprocess=$1/1024 14 | 15 | static.2.name=sdcard_boot_total 16 | static.2.source=df -t vfat 17 | static.2.regexp=mmcblk0p.\s+(\d+).*\/boot$ 18 | static.2.postprocess=$1/1024 19 | 20 | dynamic.1.name=sdcard_root_used 21 | dynamic.1.source=df -t ext4 22 | dynamic.1.regexp=mmcblk0p.\s+\d+\s+(\d+).*\/$ 23 | dynamic.1.postprocess=$1/1024 24 | dynamic.1.rrd=GAUGE 25 | 26 | dynamic.2.name=sdcard_boot_used 27 | dynamic.2.source=df -t vfat 28 | dynamic.2.regexp=mmcblk0p.\s+\d+\s+(\d+).*\/boot$ 29 | dynamic.2.postprocess=$1/1024 30 | dynamic.2.rrd=GAUGE 31 | 32 | web.status.1.content.1.title="SD card" 33 | web.status.1.content.1.icon=sd.png 34 | web.status.1.content.1.line.1="<b>/boot</b> Used: <b>"+KMG(data.sdcard_boot_used,'M')+"</b> (<b>"+Percent(data.sdcard_boot_used,data.sdcard_boot_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_boot_total-data.sdcard_boot_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_boot_total,'M') +"</b>" 35 | web.status.1.content.1.line.2=ProgressBar(data.sdcard_boot_used,data.sdcard_boot_total,60,80) 36 | web.status.1.content.1.line.3="<b>/</b> Used: <b>"+KMG(data.sdcard_root_used,'M') + "</b> (<b>" + Percent(data.sdcard_root_used,data.sdcard_root_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_root_total-data.sdcard_root_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_root_total,'M') + "</b>" 37 | web.status.1.content.1.line.4=ProgressBar(data.sdcard_root_used,data.sdcard_root_total,60,80) 38 | 39 | web.statistics.1.content.1.title="Disks - boot" 40 | web.statistics.1.content.1.graph.1=sdcard_boot_total 41 | web.statistics.1.content.1.graph.2=sdcard_boot_used 42 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_total.label=Size of /boot (MB) 43 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_total.color="#FF7777" 44 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.label=Used on /boot (MB) 45 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.lines={ fill: true } 46 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.color="#7777FF" 47 | 48 | web.statistics.1.content.2.title="Disks - root" 49 | web.statistics.1.content.2.graph.1=sdcard_root_total 50 | web.statistics.1.content.2.graph.2=sdcard_root_used 51 | web.statistics.1.content.2.ds_graph_options.sdcard_root_total.label=Size of / (MB) 52 | web.statistics.1.content.2.ds_graph_options.sdcard_root_total.color="#FF7777" 53 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.label=Used on / (MB) 54 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.lines={ fill: true } 55 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.color="#7777FF" 56 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/sdcard_xbian.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract SDCard information for Xbian 3 | # Page: 1 4 | # Information Status Statistics 5 | # - root total - yes - yes 6 | # - root used - yes - yes 7 | # - boot total - yes - yes 8 | # - boot used - yes - yes 9 | ######################################################################## 10 | static.1.name=sdcard_root_total 11 | static.1.source=df -t btrfs 12 | static.1.regexp=mmcblk0p.\s+(\d+).*\/$ 13 | static.1.postprocess=$1/1024 14 | 15 | static.2.name=sdcard_boot_total 16 | static.2.source=df -t vfat 17 | static.2.regexp=mmcblk0p.\s+(\d+).*\/boot$ 18 | static.2.postprocess=$1/1024 19 | 20 | dynamic.1.name=sdcard_root_used 21 | dynamic.1.source=df -t btrfs 22 | dynamic.1.regexp=mmcblk0p.\s+\d+\s+(\d+).*\/$ 23 | dynamic.1.postprocess=$1/1024 24 | dynamic.1.rrd=GAUGE 25 | 26 | dynamic.2.name=sdcard_boot_used 27 | dynamic.2.source=df -t vfat 28 | dynamic.2.regexp=mmcblk0p.\s+\d+\s+(\d+).*\/boot$ 29 | dynamic.2.postprocess=$1/1024 30 | dynamic.2.rrd=GAUGE 31 | 32 | web.status.1.content.1.title="SD card" 33 | web.status.1.content.1.icon=sd.png 34 | web.status.1.content.1.line.1="<b>/boot</b> Used: <b>"+KMG(data.sdcard_boot_used,'M')+"</b> (<b>"+Percent(data.sdcard_boot_used,data.sdcard_boot_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_boot_total-data.sdcard_boot_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_boot_total,'M') +"</b>" 35 | web.status.1.content.1.line.2=ProgressBar(data.sdcard_boot_used,data.sdcard_boot_total,60,80) 36 | web.status.1.content.1.line.3="<b>/</b> Used: <b>"+KMG(data.sdcard_root_used,'M') + "</b> (<b>" + Percent(data.sdcard_root_used,data.sdcard_root_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_root_total-data.sdcard_root_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_root_total,'M') + "</b>" 37 | web.status.1.content.1.line.4=ProgressBar(data.sdcard_root_used,data.sdcard_root_total,60,80) 38 | 39 | web.statistics.1.content.1.title="Disks - boot" 40 | web.statistics.1.content.1.graph.1=sdcard_boot_total 41 | web.statistics.1.content.1.graph.2=sdcard_boot_used 42 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_total.label=Size of /boot (MB) 43 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_total.color="#FF7777" 44 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.label=Used on /boot (MB) 45 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.lines={ fill: true } 46 | web.statistics.1.content.1.ds_graph_options.sdcard_boot_used.color="#7777FF" 47 | 48 | web.statistics.1.content.2.title="Disks - root" 49 | web.statistics.1.content.2.graph.1=sdcard_root_total 50 | web.statistics.1.content.2.graph.2=sdcard_root_used 51 | web.statistics.1.content.2.ds_graph_options.sdcard_root_total.label=Size of / (MB) 52 | web.statistics.1.content.2.ds_graph_options.sdcard_root_total.color="#FF7777" 53 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.label=Used on / (MB) 54 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.lines={ fill: true } 55 | web.statistics.1.content.2.ds_graph_options.sdcard_root_used.color="#7777FF" 56 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/storage.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Storage (1-sda1, 2-sda3) information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - storage1 total - yes - yes 6 | # - storage1 used - yes - yes 7 | # - storage2 total - yes - yes 8 | # - storage2 used - yes - yes 9 | ######################################################################## 10 | static.1.name=storage1_total 11 | static.1.source=df -t ext2 12 | static.1.regexp=sda1\s+(\d+) 13 | static.1.postprocess=$1/1024 14 | 15 | static.2.name=storage2_total 16 | static.2.source=df -t ext4 17 | static.2.regexp=sda3\s+(\d+) 18 | static.2.postprocess=$1/1024 19 | 20 | dynamic.1.name=storage1_used 21 | dynamic.1.source=df -t ext2 22 | dynamic.1.regexp=sda1\s+\d+\s+(\d+) 23 | dynamic.1.postprocess=$1/1024 24 | dynamic.1.rrd=GAUGE 25 | 26 | dynamic.2.name=storage2_used 27 | dynamic.2.source=df -t ext4 28 | dynamic.2.regexp=sda3\s+\d+\s+(\d+) 29 | dynamic.2.postprocess=$1/1024 30 | dynamic.2.rrd=GAUGE 31 | 32 | web.status.1.content.1.title="Storage" 33 | web.status.1.content.1.icon=usb_hdd.png 34 | web.status.1.content.1.line.1="<b>/storage1</b> Used: <b>"+KMG(data.storage1_used,'M')+"</b> (<b>"+Percent(data.storage1_used,data.storage1_total,'M')+"</b>) Free: <b>"+KMG(data.storage1_total-data.storage1_used,'M')+ "</b> Total: <b>"+ KMG(data.storage1_total,'M') +"</b>" 35 | web.status.1.content.1.line.2=ProgressBar(data.storage1_used,data.storage1_total) 36 | web.status.1.content.1.line.3="<b>/storage2</b> Used: <b>"+KMG(data.storage2_used,'M')+"</b> (<b>"+Percent(data.storage2_used,data.storage2_total,'M')+"</b>) Free: <b>"+KMG(data.storage2_total-data.storage2_used,'M')+ "</b> Total: <b>"+ KMG(data.storage2_total,'M') +"</b>" 37 | web.status.1.content.1.line.4=ProgressBar(data.storage2_used,data.storage2_total) 38 | 39 | web.statistics.1.content.1.title="Storage1" 40 | web.statistics.1.content.1.graph.1=storage1_total 41 | web.statistics.1.content.1.graph.2=storage1_used 42 | web.statistics.1.content.1.ds_graph_options.storage1_total.label=Storage1 total space (MB) 43 | web.statistics.1.content.1.ds_graph_options.storage1_total.color="#FF7777" 44 | web.statistics.1.content.1.ds_graph_options.storage1_used.label=Storage1 used space (MB) 45 | web.statistics.1.content.1.ds_graph_options.storage1_used.lines={ fill: true } 46 | web.statistics.1.content.1.ds_graph_options.storage1_used.color="#7777FF" 47 | 48 | web.statistics.1.content.2.title="Storage2" 49 | web.statistics.1.content.2.graph.1=storage2_total 50 | web.statistics.1.content.2.graph.2=storage2_used 51 | web.statistics.1.content.2.ds_graph_options.storage2_total.label=Storage2 total space (MB) 52 | web.statistics.1.content.2.ds_graph_options.storage2_total.color="#FF7777" 53 | web.statistics.1.content.2.ds_graph_options.storage2_used.label=Storage2 used space (MB) 54 | web.statistics.1.content.2.ds_graph_options.storage2_used.lines={ fill: true } 55 | web.statistics.1.content.2.ds_graph_options.storage2_used.color="#7777FF" 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/sunxi_axp209.conf: -------------------------------------------------------------------------------- 1 | include=/etc/rpimonitor/template/version.conf 2 | include=/etc/rpimonitor/template/uptime.conf 3 | include=/etc/rpimonitor/template/axp209_cpu_pmu_temp.conf 4 | include=/etc/rpimonitor/template/memory.conf 5 | include=/etc/rpimonitor/template/swap.conf 6 | include=/etc/rpimonitor/template/sdcard.conf 7 | include=/etc/rpimonitor/template/network.conf 8 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/swap.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Swap information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - swap total - yes - yes 6 | # - swap used - yes - yes 7 | ######################################################################## 8 | static.1.name=swap_total 9 | static.1.source=/proc/meminfo 10 | static.1.regexp=SwapTotal:\s+(\d+) 11 | static.1.postprocess=$1/1024 12 | 13 | dynamic.1.name=swap_used 14 | dynamic.1.source=/proc/meminfo 15 | dynamic.1.regexp=SwapFree:\s+(\d+) 16 | dynamic.1.postprocess=$this->{'static'}->{'swap_total'} - ($1/1024) 17 | dynamic.1.rrd=GAUGE 18 | 19 | web.status.1.content.1.title="Swap" 20 | web.status.1.content.1.icon=swap.png 21 | web.status.1.content.1.line.1="Used: <b>"+KMG(data.swap_used,'M')+"</b> (<b>"+Percent(data.swap_used,data.swap_total,'M')+"</b>) Free: <b>"+KMG(data.swap_total-data.swap_used,'M')+ "</b> Total: <b>"+ KMG(data.swap_total,'M') + "</b>" 22 | web.status.1.content.1.line.2=ProgressBar(data.swap_used,data.swap_total) 23 | 24 | web.statistics.1.content.1.title="Swap" 25 | web.statistics.1.content.1.graph.1=swap_total 26 | web.statistics.1.content.1.graph.2=swap_used 27 | web.statistics.1.content.1.ds_graph_options.swap_total.label=Swap size (MB) 28 | web.statistics.1.content.1.ds_graph_options.swap_total.color="#FF7777" 29 | web.statistics.1.content.1.ds_graph_options.swap_used.label=Swap used (MB) 30 | web.statistics.1.content.1.ds_graph_options.swap_used.lines={ fill: true } 31 | web.statistics.1.content.1.ds_graph_options.swap_used.color="#7777FF" 32 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/temperature.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract CPU Temperature information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - cpu temperature - yes - yes 6 | # 7 | # Note: Rounding temperatures to two digits is done with the 8 | # post-processiing formula: sprintf("%.2f", $1/1000) 9 | # It is possible to round to 1 digit with sprintf("%.1f", $1/1000) 10 | ######################################################################## 11 | dynamic.1.name=soc_temp 12 | dynamic.1.source=/sys/devices/virtual/thermal/thermal_zone0/temp 13 | dynamic.1.regexp=(.*) 14 | dynamic.1.postprocess=sprintf("%.2f", $1/1000) 15 | dynamic.1.rrd=GAUGE 16 | 17 | web.status.1.content.1.title="Temperature" 18 | web.status.1.content.1.icon=cpu_temp.png 19 | #web.status.1.content.1.line.1="CPU Temperature: <b>"+data.soc_temp+"°C</b>" 20 | web.status.1.content.1.line.1=JustGageBar("CPU Temperature", data.soc_temp+"°C", 40, data.soc_temp, 80, 100, 80) 21 | #web.status.1.content.1.line.1=JustGageBar("Temperature", "°C", 40, data.soc_temp, 80, 100, 80) 22 | 23 | web.statistics.1.content.1.title="Temperature" 24 | web.statistics.1.content.1.graph.1=soc_temp 25 | web.statistics.1.content.1.ds_graph_options.soc_temp.label=Core temperature (°C) 26 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/temperature_xbian.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract CPU Temperature information for Xbian 3 | # Page: 1 4 | # Information Status Statistics 5 | # - cpu temperature - yes - yes 6 | ######################################################################## 7 | dynamic.1.name=soc_temp 8 | dynamic.1.source= /opt/vc/bin/vcgencmd measure_temp 9 | dynamic.1.regexp=(\d+\.\d+) 10 | dynamic.1.postprocess= 11 | dynamic.1.rrd=GAUGE 12 | 13 | web.status.1.content.1.title="Temperature" 14 | web.status.1.content.1.icon=cpu_temp.png 15 | web.status.1.content.1.line.1="CPU Temperature: <b>"+data.soc_temp+"°C</b>" 16 | 17 | web.statistics.1.content.1.title="Temperature" 18 | web.statistics.1.content.1.graph.1=soc_temp 19 | web.statistics.1.content.1.ds_graph_options.soc_temp.label=Core temperature (deg C) 20 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/uptime.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract Uptime information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - uptime - yes - yes 6 | ######################################################################## 7 | dynamic.1.name=uptime 8 | dynamic.1.source=/proc/uptime 9 | dynamic.1.regexp=(^\S+) 10 | dynamic.1.postprocess= 11 | dynamic.1.rrd=GAUGE 12 | 13 | web.status.1.content.1.title="Uptime" 14 | web.status.1.content.1.icon=uptime.png 15 | web.status.1.content.1.line.1='Raspberry Pi time: <b>' + Clock( data.localtime) + "</b>" 16 | web.status.1.content.1.line.2="Uptime: " + Uptime(data.uptime) 17 | 18 | web.statistics.1.content.1.title="Uptime" 19 | web.statistics.1.content.1.graph.1=uptime 20 | web.statistics.1.content.1.graph_options.yaxis={ min:0, tickFormatter: function (v) { if (v > 86400) return (Math.round(v*10/60/60/24)/10) + " d" ; if (v > 3600) return (Math.round(v*10/60/60)/10) + " h" ; else return v + " s" }, } 21 | web.statistics.1.content.1.ds_graph_options.uptime.label=Uptime (s/h/d) 22 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/version.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract System information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - distribution name - yes - no 6 | # - kernel version - yes - no 7 | # - firmware version - yes - no 8 | # - processor model - yes - no 9 | # - num of pkg upgradable - yes - no 10 | # - list of pkg upgradable - yes - no 11 | ######################################################################## 12 | static.1.name=distribution 13 | static.1.source=/etc/os-release 14 | static.1.regexp=PRETTY_NAME.\"(.*)\" 15 | static.1.postprocess= 16 | snmp.distribution.id=1 17 | snmp.distribution.type=string 18 | snmp.distribution.description=distribution 19 | snmp.distribution.postprocess= 20 | 21 | static.2.name=kernel_version 22 | static.2.source=uname -msr 23 | static.2.regexp=(.*) 24 | static.2.postprocess= 25 | snmp.kernel_version.id=2 26 | snmp.kernel_version.type=string 27 | snmp.kernel_version.description=kernel_version 28 | snmp.kernel_version.postprocess= 29 | 30 | static.3.name=firmware 31 | static.3.source=/proc/version 32 | static.3.regexp=(#\d+) 33 | static.3.postprocess= 34 | snmp.firmware.id=3 35 | snmp.firmware.type=string 36 | snmp.firmware.description=firmware 37 | snmp.firmware.postprocess= 38 | 39 | static.4.name=processor 40 | static.4.source=/proc/cpuinfo 41 | static.4.regexp=(?:Processor|model name|Hardware)\s+: (.*) 42 | static.4.postprocess= 43 | snmp.processor.id=4 44 | snmp.processor.type=string 45 | snmp.processor.description=processor 46 | snmp.processor.postprocess= 47 | 48 | dynamic.1.name=upgrade 49 | dynamic.1.source=/var/lib/rpimonitor/updatestatus.txt 50 | dynamic.1.regexp=(\d+ upgradable\(s\)|.* .*) 51 | dynamic.1.postprocess= 52 | dynamic.1.rrd= 53 | snmp.upgrade.id=5 54 | snmp.upgrade.type=string 55 | snmp.upgrade.description=upgrade 56 | snmp.upgrade.postprocess= 57 | 58 | dynamic.2.name=packages 59 | dynamic.2.source=/var/lib/rpimonitor/updatestatus.txt 60 | dynamic.2.regexp=^\s+(.*)\s+\d+ upgradable 61 | dynamic.2.postprocess= 62 | dynamic.2.rrd= 63 | snmp.package.id=6 64 | snmp.package.type=string 65 | snmp.package.description=packages 66 | snmp.package.postprocess= 67 | 68 | web.status.1.content.1.title="Version" 69 | web.status.1.content.1.icon=version.png 70 | web.status.1.content.1.line.1='Processor: <b>' + data.processor + '</b>' 71 | web.status.1.content.1.line.2='Distribution: <b>'+ data.distribution + '</b>' 72 | web.status.1.content.1.line.3='Kernel version: <b>' + data.kernel_version + '</b>' 73 | web.status.1.content.1.line.4='Firmware: <b>' + data.firmware + '</b>' 74 | web.status.1.content.1.line.5='Package(s): <b>' + data.upgrade + '</b>' + ShowInfo('packages','Package(s) upgradable(s)',data.packages) 75 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/wlan.conf: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # Extract WiFi information 3 | # Page: 1 4 | # Information Status Statistics 5 | # - recieved - yes - yes 6 | # - sent - yes - yes 7 | ######################################################################## 8 | dynamic.1.name=wifi_received 9 | dynamic.1.source=/sys/class/net/wlan0/statistics/rx_bytes 10 | dynamic.1.regexp=(.*) 11 | dynamic.1.postprocess=$1*-1 12 | dynamic.1.rrd=DERIVE 13 | dynamic.1.max=0 14 | 15 | dynamic.2.name=wifi_send 16 | dynamic.2.source=/sys/class/net/wlan0/statistics/tx_bytes 17 | dynamic.2.regexp=(.*) 18 | dynamic.2.postprocess= 19 | dynamic.2.rrd=DERIVE 20 | dynamic.2.min=0 21 | 22 | web.status.1.content.1.title="WiFi" 23 | web.status.1.content.1.icon=wifi.png 24 | web.status.1.content.1.line.1="WiFi Sent: <b>"+KMG(data.wifi_send)+"<i class='icon-arrow-up'></i></b> Received: <b>"+KMG(Math.abs(data.wifi_received)) + "<i class='icon-arrow-down'></i></b>" 25 | 26 | web.statistics.1.content.1.title="WiFi" 27 | web.statistics.1.content.1.graph.1=wifi_send 28 | web.statistics.1.content.1.graph.2=wifi_received 29 | web.statistics.1.content.1.graph_options.yaxis={ tickFormatter: function (v) { if (Math.abs(v) > 1048576) return (Math.round(v*10/1024/1024)/10) + " MiB/s" ; if (Math.abs(v) > 1024) return (Math.round(v*10/1024)/10) + " KiB/s" ; else return v + " B/s" }, } 30 | web.statistics.1.content.1.ds_graph_options.wifi_send.label=Upload bandwidth (bits) 31 | web.statistics.1.content.1.ds_graph_options.wifi_send.lines={ fill: true } 32 | web.statistics.1.content.1.ds_graph_options.wifi_send.color="#FF7777" 33 | web.statistics.1.content.1.ds_graph_options.wifi_received.label=Download bandwidth (bits) 34 | web.statistics.1.content.1.ds_graph_options.wifi_received.lines={ fill: true } 35 | web.statistics.1.content.1.ds_graph_options.wifi_received.color="#77FF77" 36 | -------------------------------------------------------------------------------- /src/etc/rpimonitor/template/xbian.conf: -------------------------------------------------------------------------------- 1 | include=/etc/rpimonitor/template/version.conf 2 | include=/etc/rpimonitor/template/uptime.conf 3 | include=/etc/rpimonitor/template/cpu.conf 4 | include=/etc/rpimonitor/template/temperature_xbian.conf 5 | include=/etc/rpimonitor/template/memory.conf 6 | include=/etc/rpimonitor/template/swap.conf 7 | include=/etc/rpimonitor/template/sdcard_xbian.conf 8 | include=/etc/rpimonitor/template/network.conf 9 | -------------------------------------------------------------------------------- /src/etc/snmp/snmpd.conf.rpimonitor: -------------------------------------------------------------------------------- 1 | agentAddress udp:127.0.0.1:161 2 | view systemonly included .1.3.6.1.2.1.1 3 | view systemonly included .1.3.6.1.2.1.25.1 4 | view systemonly included .1.3.6.1.4.1.54321 5 | rocommunity public default -V systemonly 6 | rouser authOnlyUser 7 | sysLocation Sitting on the Dock of the Bay 8 | sysContact Me <me@example.org> 9 | sysServices 72 10 | pass_persist .1.3.6.1.4.1.54321 /usr/bin/rpimonitord-snmp 11 | 12 | -------------------------------------------------------------------------------- /src/usr/bin/rpimonitord-snmp: -------------------------------------------------------------------------------- 1 | rpimonitord -------------------------------------------------------------------------------- /src/usr/lib/systemd/system/rpimonitord-upgradable.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = search for upgradable packages to be displayed by rpimonitor 3 | After = network.target 4 | 5 | [Service] 6 | ExecStart = /usr/share/rpimonitor/scripts/updatePackagesStatus.pl 7 | -------------------------------------------------------------------------------- /src/usr/lib/systemd/system/rpimonitord-upgradable.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = timer to search for upgradable packages to be displayed by rpimonitor 3 | After = network.target 4 | 5 | [Timer] 6 | OnCalendar = 03:10 7 | Persistent = true 8 | Unit = rpimonitord-upgradable.service 9 | 10 | [Install] 11 | WantedBy = multi-user.target 12 | -------------------------------------------------------------------------------- /src/usr/lib/systemd/system/rpimonitord.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = System monitor for the Raspberry PI 3 | After = network.target 4 | 5 | [Service] 6 | Type = simple 7 | ExecStart = /usr/bin/rpimonitord 8 | 9 | [Install] 10 | WantedBy = multi-user.target 11 | -------------------------------------------------------------------------------- /src/usr/lib/systemd/system/sunxi-temp-daemon.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = sunxi Temperature daemon for RPi-Monitor 3 | After = network.target 4 | 5 | [Service] 6 | Type = simple 7 | ExecStart = /usr/share/rpimonitor/scripts/sunxi-temp-daemon.sh 8 | 9 | [Install] 10 | WantedBy = multi-user.target 11 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/scripts/rpimonitor-helper.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: rpimonitor-helper 4 | # Required-Start: $remote_fs $syslog 5 | # Required-Stop: $remote_fs $syslog 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # X-Interactive: true 9 | # Short-Description: RPi-Monitor sunxi-temp helper 10 | # Description: RPi-Monitor helper daemon for providing cpustats, Vcore and disk temperature 11 | ### END INIT INFO 12 | 13 | # Source function library. 14 | . /lib/lsb/init-functions 15 | 16 | DAEMON="/usr/local/sbin/rpimonitor-helper.sh" 17 | PIDFILE="/var/run/rpimonitor-helper.pid" 18 | 19 | [ -x $DAEMON ] || exit 0 20 | 21 | checkroot(){ 22 | if [ "$(id -u)" != "0" ]; then 23 | echo "This script must be run as root" 24 | exit 1 25 | fi 26 | } 27 | 28 | start() { 29 | touch $PIDFILE 30 | 31 | for pid in $(cat $PIDFILE); do 32 | if ( kill -0 $pid > /dev/null 2>&1 ); then 33 | echo "RPi-Monitor helper is already running."; 34 | status; 35 | return 0; 36 | fi 37 | done; 38 | 39 | log_daemon_msg "Starting RPi-Monitor helper" "rpimonitor-helper" 40 | nice -n 19 $DAEMON $PIDFILE & 41 | status=$? 42 | log_end_msg $status 43 | } 44 | 45 | stop() { 46 | touch $PIDFILE 47 | log_daemon_msg "Stopping RPi-Monitor helper" "rpimonitor-helper" 48 | for pid in $(cat $PIDFILE); do 49 | kill -15 $pid > /dev/null 2>&1 50 | done 51 | status=$? 52 | log_end_msg $status 53 | rm $PIDFILE 54 | } 55 | 56 | restart() { 57 | stop 58 | sleep 2 59 | start 60 | } 61 | 62 | status(){ 63 | echo -n "RPi-Monitor helper status: " 64 | if [ ! -f $PIDFILE ]; then 65 | echo "Not running" 66 | exit 0 67 | fi 68 | for pid in $(cat $PIDFILE); do 69 | kill -0 $pid > /dev/null 2>&1 && echo -n "[ \033[1;32mok\033[0m ]" || echo -n "[\033[31mFAIL\033[0m]"; 70 | done; 71 | echo 72 | } 73 | 74 | checkroot 75 | case "$1" in 76 | start) 77 | start 78 | ;; 79 | stop) 80 | stop 81 | ;; 82 | status) 83 | status 84 | ;; 85 | restart) 86 | restart 87 | ;; 88 | *) 89 | echo "Usage: $0 {start|stop|restart|status}" 90 | ;; 91 | esac 92 | 93 | exit 0 94 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/scripts/sunxi_tp_temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/scripts/sunxi_tp_temp -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/scripts/updatePackagesStatus.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright 2013 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 | # 18 | use File::Which; 19 | use strict; 20 | 21 | if(which('aptitude')) { 22 | open ( FILE, 'aptitude -F%p --disable-columns search ~U |') or die "$!\n"; 23 | } elsif (which('checkupdates')) { 24 | open ( FILE, 'checkupdates |' ) or die "$!\n"; 25 | } else { 26 | die "Error: neither checkupdates nor aptitude seem to be available\n"; 27 | } 28 | 29 | my $pkgnbr = 0; 30 | my $pkglist = ""; 31 | while (<FILE>){ 32 | chomp; 33 | $pkglist = "$pkglist $_";+ 34 | $pkgnbr++; 35 | } 36 | close (FILE); 37 | open ( FILE, '> /var/lib/rpimonitor/updatestatus.txt' ) or die "$!\n"; 38 | print FILE "$pkglist $pkgnbr upgradable(s)\n"; 39 | close (FILE); 40 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons.html: -------------------------------------------------------------------------------- 1 | <!-- 2 | # Copyright 2013-2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. 16 | # 17 | --> 18 | <!DOCTYPE html> 19 | <html lang="en"> 20 | <head> 21 | <title>RPi-Monitor 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 |
43 |
44 |
45 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/about/about.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/addons/about/about.css -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/about/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
10 |

About addons

11 |
12 |
13 | Addons are designed to let you add more functionality to RPi-Monitor. 14 |
15 |
16 | This release of RPi-Monitor provides the following addons:
17 |
    18 |
  • about - This addon
  • 19 |
  • example - Example of addons showing how to develop addons that are fully integrated with RPi-Monitor
  • 20 |
  • custom - Custom addon using <iframe> to display external html page. This 21 | addon is use for shellinabox or Hawkeye webcam - 22 | See documentation for details.
  • 23 |
  • top3 - Show the top 3 processes using cpu and rpimonitord cpu usage
  • 24 |
25 |
26 | Addons are configured through /etc/rpimonitor/data.conf. You can customize the RPi-Monitor configuration to add or remove addons. 27 |
28 |
29 | Refer to comments in configuration file to see in detail how to manage and use addons. 30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/about/about.js: -------------------------------------------------------------------------------- 1 | var activePage = GetURLParameter('activePage'); 2 | if (activePage == null){ activePage = 0; } 3 | 4 | $(function () { 5 | options = '

'+ 6 | 'No option available for this addon'+ 7 | '

' 8 | $(options).insertBefore("#optionsInsertionPoint") 9 | }); 10 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/custom/custom.css: -------------------------------------------------------------------------------- 1 | #customframe, 2 | #customdiv { 3 | margin-top: 8px; 4 | padding: 0px 0px 0px 0px; 5 | min-width: 100%; 6 | min-height: 100%; 7 | border:0px; 8 | } 9 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/custom/custom.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/custom/custom.js: -------------------------------------------------------------------------------- 1 | var customwarning = true; 2 | var customuri; 3 | var activePage = GetURLParameter('activePage'); 4 | if (activePage == null){ activePage = 0; } 5 | 6 | $(function () { 7 | resize_frame(); 8 | 9 | data = getData('addons'); 10 | 11 | options = '

'+ 12 | 'Custom addons
'+ 13 | '

' 14 | if (data[activePage].allowupdate || true ) { 15 | options = 'Custom url: '+ 16 | '
'+ 17 | ''+ 18 | ''+ 19 | ''+ 20 | ''+ 21 | '

' 22 | } 23 | options = ' Show warning on page close or refresh'+ 24 | '
'+ 25 | '

' 26 | $(options).insertBefore("#optionsInsertionPoint") 27 | 28 | $("#defaulturi").click(function(){ 29 | customuri = data[activePage].url;//"/addons/custom/custominfo.html"; 30 | $('#customuri'+activePage).val(customuri); 31 | localStorage.setItem('customuri'+activePage, customuri); 32 | $("#customframe").attr('src', customuri); 33 | }); 34 | 35 | customwarning=(localStorage.getItem('customwarning'+activePage) === 'true' ); 36 | $('#customwarning'+activePage).attr('checked', customwarning ); 37 | 38 | $('#customwarning'+activePage).click(function(){ 39 | customwarning = $('#customwarning'+activePage).is(":checked"); 40 | localStorage.setItem('customwarning'+activePage, customwarning); 41 | }); 42 | 43 | if (data[activePage].allowupdate || true ) { 44 | customuri=(localStorage.getItem('customuri'+activePage) || data[activePage].url || '/addons/custom/custominfo.html'); 45 | $('#customuri'+activePage).val(customuri); 46 | $('#customuri'+activePage).keyup(function(){ 47 | customuri = $('#customuri'+activePage).val(); 48 | localStorage.setItem('customuri'+activePage, customuri); 49 | $("#customframe").attr('src', customuri); 50 | }); 51 | 52 | $("#customframe").attr('src', customuri); 53 | } 54 | }); 55 | 56 | function resize_frame(){ 57 | var window_height = $(window).height() - 100; 58 | $('#customdiv').css('height',window_height+'px'); 59 | } 60 | 61 | $(window).resize(function() { 62 | resize_frame(); 63 | }); 64 | 65 | window.onbeforeunload = function (e) { 66 | if ( !customwarning ) return; 67 | e = e || window.event; 68 | message="Closing or refreshing this page will also close your connection."; 69 | if (e) { 70 | e.returnValue = message; 71 | } 72 | return message; 73 | }; 74 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/custom/custominfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
10 |

Custom addon

11 |
12 |
13 | Custom addon is design to let you add custom pages to 14 | RPi-Monitor easily.
15 |
16 | This addons is using <iframe> to display external 17 | html page, web site or anything else that can be displayed by your 18 | browser. The url to be displayed is configurable in 19 | RPi-Monitor configuration file and/or in Options dialog box.
20 | You can use custom addon many time in the same configuration and 21 | configure each addons individually.
22 |
23 | Refer to documentation to 24 | see example of usages. 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/example/example.css: -------------------------------------------------------------------------------- 1 | #text{ 2 | font-size: 51px; 3 | } 4 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/example/example.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Example addon

5 |
6 |
7 | Example addon shows how you can develop your own addon for 8 | RPi-Monitor.
9 |
10 | An addon (named for this example example) is composed 11 | by a set of 3 files stored in the subdirectory of the same name
12 | /usr/share/rpimonitor/web/addons/example/: 13 | 18 | These 3 files are directly used by RPi-Monitor to render a page. 19 | Javascript of the addon have a direct access to RPi-Monitor 20 | data using the functions in rpimonitor.utils.js and the 21 | functions getData('json_data').
22 |
23 | This example is showing how to get uptime information and display it 24 | using the function Uptime( value ):
25 |
26 |
addonInsertionPoint

27 | Refer to documentation to see example of usages. 28 |
29 |
30 |
31 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/example/example.js: -------------------------------------------------------------------------------- 1 | var activePage = GetURLParameter('activePage'); 2 | if (activePage == null){ activePage = 0; } 3 | 4 | function UpdateAddon () { 5 | $.getJSON('dynamic.json', function(data) { 6 | // Concatenate dynamic.json and static.json into data variable 7 | $.extend(data, getData('static')); 8 | 9 | //ADD YOUR JAVASCRIPT HERE 10 | //Example using data from RPi-Monitor and function provided by rpimonitor.utils.js 11 | textToDisplay = "Uptime: " + Uptime(data.uptime); 12 | $("#addonInsertionPoint").html(textToDisplay) 13 | 14 | }) 15 | } 16 | 17 | $(function () { 18 | alert('Example addons is showing how to dynamically display Raspberry Pi uptime.\n'+ 19 | 'Have a look to "addonInsertionPoint" bellow and click OK') 20 | 21 | options = '

'+ 22 | 'Example
'+ 23 | '

'+ 24 | ' Add addons option(s)'+ 25 | '
'+ 26 | '

' 27 | $(options).insertBefore("#optionsInsertionPoint") 28 | UpdateAddon(); 29 | 30 | //if ( statusautorefresh ) { 31 | // refreshTimerId = setInterval( UpdateAddon , 10000 ) 32 | // clockId=setInterval(Tick,1000); 33 | //} 34 | 35 | }); 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/top3/top3: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright 2013-2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | # web.status.1.content.1.line.4=InsertHTML("/addons/top3/top3.html") 19 | # 20 | my $process='rpimonitor'; 21 | my $web=1; 22 | my $nbtop=3; 23 | my @top=[]; 24 | my $monitored; 25 | 26 | #Get uptime 27 | my $uptime; 28 | open ( FILE, "/proc/uptime") or die "Can't open /proc/uptime \n"; 29 | while (){ 30 | /(\S+) \S+/; 31 | $uptime = $_; 32 | } 33 | 34 | my $idx=0; 35 | open (PS, 'ps -e -o etimes,time,comm --sort -time |') or die; 36 | while () 37 | { 38 | /TIME/ and next; 39 | $idx++; 40 | /$process/ and $monitored->{'idx'} ||= $idx; 41 | /$process/ or $idx <= $nbtop or next; 42 | /(\S+) (\S+):(\S+):(\S+) (\S+)/; 43 | $1 or next; 44 | my $start=100*($2*60*60+$3*60+$4)/$1; 45 | my $total=100*($2*60*60+$3*60+$4)/$uptime; 46 | $web 47 | and $top[$idx] = sprintf("%3d%02d:%02d:%02d%-12s( %.2f% / %.2f% )\n",$idx, $2, $3, $4, $5, $start, $total) 48 | or $top[$idx] = sprintf("%3d %02d:%02d:%02d %-12s ( %.2f% / %.2f% ) \n",$idx, $2, $3, $4, $5, $start, $total); 49 | } 50 | close PS or die; 51 | my $iloop; 52 | 53 | $web 54 | and print "\n" 55 | and print "\n"; 56 | for ($iloop=1; $iloop<=$nbtop; $iloop++) 57 | { 58 | print $top[$iloop]; 59 | } 60 | if ($iloop < $monitored->{'idx'}){ 61 | $web 62 | and print "\n" 63 | or print " ...\n"; 64 | } 65 | if ($iloop <= $monitored->{'idx'}){ 66 | print $top[$monitored->{'idx'}]; 67 | } 68 | $web 69 | and print "
#CPU usageProcess% start / total
...
\n"; 70 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/top3/top3.cron: -------------------------------------------------------------------------------- 1 | # 2 | * * * * * root cd /usr/share/rpimonitor/web/addons/top3; ./top3 > top3.html 3 | 4 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/top3/top3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
9 |

Top3 addons

10 |
11 |
12 | Top3 is design show the 3 process consuming the CPU time of 13 | CPU in addition to cunsumption of rpimonitord process.
14 |
15 | To activate this addon, copy /usr/share/rpimonitor/web/addons/top3/top3.cron 16 | to /etc/cron.d/top3.
17 |
18 | Adding the top3 information into status page can be done by uncommenting 19 | the following line into cpu.conf
20 | #web.status.1.content.1.line.4=InsertHTML("/addons/top3/top3.html") 21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/addons/top3/top3.js: -------------------------------------------------------------------------------- 1 | var activePage = GetURLParameter('activePage'); 2 | if (activePage == null){ activePage = 0; } 3 | 4 | $(function () { 5 | options = '

'+ 6 | 'No option available for this addon'+ 7 | '

' 8 | $(options).insertBefore("#optionsInsertionPoint") 9 | UpdateAddon(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/css/rpimonitor.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of RPi-Monitor project 3 | * 4 | * Copyright 2013-2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | /* Main marketing message and start button */ 21 | .jumbotron { 22 | /*margin: 40px 180px 180px;*/ 23 | text-align: center; 24 | } 25 | .jumbotron h1 { 26 | font-size: 72px; 27 | line-height: 1; 28 | } 29 | .jumbotron .btn { 30 | font-size: 21px; 31 | padding: 14px 24px; 32 | } 33 | 34 | /* Move content away from navbar */ 35 | body { 36 | padding-top: 50px; 37 | } 38 | 39 | /* Move rrd graph away from navbar */ 40 | #mygraph { 41 | margin-top: 30px; 42 | } 43 | 44 | /* Draw a progression bar during rrd load */ 45 | #preloader { 46 | position:fixed; 47 | z-index: 100; 48 | top:50%; 49 | left:50%; 50 | margin:-100px 0 0 -100px; 51 | width:200px; 52 | height:200px; 53 | } 54 | 55 | .page-title { 56 | text-align: center; 57 | font-family: Tahoma, Helvetica; 58 | font-size: 21px; 59 | } 60 | 61 | .Title { 62 | float: left; 63 | font-family: Tahoma, Helvetica; 64 | font-size: 21px; 65 | padding-left: 30px; 66 | width: 250px; 67 | } 68 | 69 | .Text { 70 | float: left; 71 | font-family: Tahoma, Helvetica; 72 | font-size: 13px; 73 | line-height: 13px; 74 | padding-left: 30px; 75 | padding-right: 30px; 76 | padding-top: 15px; 77 | width: 518px; 78 | white-space: nowrap; 79 | } 80 | 81 | .popover-content { 82 | line-height: 16px; 83 | } 84 | 85 | .popover { 86 | max-width: 450px; 87 | } 88 | 89 | #shellinaboxframe, 90 | #shellinaboxdiv { 91 | min-width: 100%; 92 | min-height: 100%; 93 | } 94 | 95 | .justgage { 96 | display: inline-block; 97 | } 98 | 99 | .row { 100 | display: inline-block; 101 | } 102 | @media screen and (min-width: 1025px) { 103 | .column-fluid { 104 | -webkit-column-rule: 1px solid #f0f0f0; 105 | -moz-column-rule: 1px solid #f0f0f0; 106 | column-rule: 1px solid #f0f0f0; 107 | } 108 | } 109 | @media screen and (min-width: 1025px) and (max-width: 1526px) { 110 | .column-fluid { 111 | -webkit-column-count: 2; 112 | -moz-column-count: 2; 113 | column-count: 2; 114 | } 115 | } 116 | @media screen and (min-width: 1526px) { 117 | .column-fluid { 118 | -webkit-columns-count: 3; 119 | -moz-column-count: 3; 120 | column-count: 3; 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/avatar.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/cpu.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/cpu_temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/cpu_temp.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/daemons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/daemons.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/favicon.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/logo.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/memory.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/network.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/ok.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/pmu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/pmu.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/preloader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/preloader.gif -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/printer.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/sd.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/swap.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/timesync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/timesync.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/tor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/tor.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/uptime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/uptime.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/usb_hdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/usb_hdd.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/user.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/version.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/warning.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/img/wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/a9cc2db6e7deee3a5c8c6fb84055f0e9824a5c6d/src/usr/share/rpimonitor/web/img/wifi.png -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | RPi-Monitor 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 |  
44 |
45 |
46 |

RPi-Monitor

47 |

Welcome to RPi-Monitor web interface.

48 |

Start

49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/js/flot/jquery.flot.selection.min.js: -------------------------------------------------------------------------------- 1 | (function(a){function b(k){var p={first:{x:-1,y:-1},second:{x:-1,y:-1},show:false,active:false};var m={};var r=null;function e(s){if(p.active){l(s);k.getPlaceholder().trigger("plotselecting",[g()])}}function n(s){if(s.which!=1){return}document.body.focus();if(document.onselectstart!==undefined&&m.onselectstart==null){m.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!==undefined&&m.ondrag==null){m.ondrag=document.ondrag;document.ondrag=function(){return false}}d(p.first,s);p.active=true;r=function(t){j(t)};a(document).one("mouseup",r)}function j(s){r=null;if(document.onselectstart!==undefined){document.onselectstart=m.onselectstart}if(document.ondrag!==undefined){document.ondrag=m.ondrag}p.active=false;l(s);if(f()){i()}else{k.getPlaceholder().trigger("plotunselected",[]);k.getPlaceholder().trigger("plotselecting",[null])}return false}function g(){if(!f()){return null}var u={},t=p.first,s=p.second;a.each(k.getAxes(),function(v,w){if(w.used){var y=w.c2p(t[w.direction]),x=w.c2p(s[w.direction]);u[v]={from:Math.min(y,x),to:Math.max(y,x)}}});return u}function i(){var s=g();k.getPlaceholder().trigger("plotselected",[s]);if(s.xaxis&&s.yaxis){k.getPlaceholder().trigger("selected",[{x1:s.xaxis.from,y1:s.yaxis.from,x2:s.xaxis.to,y2:s.yaxis.to}])}}function h(t,u,s){return us?s:u)}function d(w,t){var v=k.getOptions();var u=k.getPlaceholder().offset();var s=k.getPlotOffset();w.x=h(0,t.pageX-u.left-s.left,k.width());w.y=h(0,t.pageY-u.top-s.top,k.height());if(v.selection.mode=="y"){w.x=w==p.first?0:k.width()}if(v.selection.mode=="x"){w.y=w==p.first?0:k.height()}}function l(s){if(s.pageX==null){return}d(p.second,s);if(f()){p.show=true;k.triggerRedrawOverlay()}else{q(true)}}function q(s){if(p.show){p.show=false;k.triggerRedrawOverlay();if(!s){k.getPlaceholder().trigger("plotunselected",[])}}}function c(s,w){var t,y,z,A,x=k.getAxes();for(var u in x){t=x[u];if(t.direction==w){A=w+t.n+"axis";if(!s[A]&&t.n==1){A=w+"axis"}if(s[A]){y=s[A].from;z=s[A].to;break}}}if(!s[A]){t=w=="x"?k.getXAxes()[0]:k.getYAxes()[0];y=s[w+"1"];z=s[w+"2"]}if(y!=null&&z!=null&&y>z){var v=y;y=z;z=v}return{from:y,to:z,axis:t}}function o(t,s){var v,u,w=k.getOptions();if(w.selection.mode=="y"){p.first.x=0;p.second.x=k.width()}else{u=c(t,"x");p.first.x=u.axis.p2c(u.from);p.second.x=u.axis.p2c(u.to)}if(w.selection.mode=="x"){p.first.y=0;p.second.y=k.height()}else{u=c(t,"y");p.first.y=u.axis.p2c(u.from);p.second.y=u.axis.p2c(u.to)}p.show=true;k.triggerRedrawOverlay();if(!s&&f()){i()}}function f(){var s=5;return Math.abs(p.second.x-p.first.x)>=s&&Math.abs(p.second.y-p.first.y)>=s}k.clearSelection=q;k.setSelection=o;k.getSelection=g;k.hooks.bindEvents.push(function(t,s){var u=t.getOptions();if(u.selection.mode!=null){s.mousemove(e);s.mousedown(n)}});k.hooks.drawOverlay.push(function(v,D){if(p.show&&f()){var t=v.getPlotOffset();var s=v.getOptions();D.save();D.translate(t.left,t.top);var z=a.color.parse(s.selection.color);D.strokeStyle=z.scale("a",0.8).toString();D.lineWidth=1;D.lineJoin="round";D.fillStyle=z.scale("a",0.4).toString();var B=Math.min(p.first.x,p.second.x),A=Math.min(p.first.y,p.second.y),C=Math.abs(p.second.x-p.first.x),u=Math.abs(p.second.y-p.first.y);D.fillRect(B,A,C,u);D.strokeRect(B,A,C,u);D.restore()}});k.hooks.shutdown.push(function(t,s){s.unbind("mousemove",e);s.unbind("mousedown",n);if(r){a(document).unbind("mouseup",r)}})}a.plot.plugins.push({init:b,options:{selection:{mode:null,color:"#e8cfac"}},name:"selection",version:"1.1"})})(jQuery); -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/js/flot/jquery.flot.stack.min.js: -------------------------------------------------------------------------------- 1 | (function(b){var a={series:{stack:null}};function c(f){function d(k,j){var h=null;for(var g=0;g2&&(G?g.format[2].x:g.format[2].y),n=u&&v.lines.steps,E=true,q=G?1:0,H=G?0:1,D=0,B=0,A;while(true){if(D>=F.length){break}A=t.length;if(F[D]==null){for(m=0;m=y.length){if(!u){for(m=0;mJ){if(u&&D>0&&F[D-z]!=null){k=w+(F[D-z+H]-w)*(J-x)/(F[D-z+q]-x);t.push(J);t.push(k+I);for(m=2;m0&&y[B-h]!=null){r=I+(y[B-h+H]-I)*(x-J)/(y[B-h+q]-J)}t[A+H]+=r;D+=z}}E=false;if(A!=t.length&&o){t[A+2]+=r}}}}if(n&&A!=t.length&&A>0&&t[A]!=null&&t[A]!=t[A-z]&&t[A+1]!=t[A-z+1]){for(m=0;m0){k=a("#flotTip")}else{k=a("
").attr("id","flotTip");k.appendTo("body").hide().css({position:"absolute"});if(i.defaultTheme){k.css({background:"#fff","z-index":"100",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111"})}}a(j).bind("plothover",function(a,b,e){if(e){var f;if(d.xaxis.mode==="time"||d.xaxes[0].mode==="time"){f=h(i.content,e,g)}else{f=h(i.content,e)}k.html(f).css({left:c.x+i.shifts.x,top:c.y+i.shifts.y}).show()}else{k.hide().html("")}});e.mousemove(f)});var h=function(a,b,c){var d=/%p\.{0,1}(\d{0,})/;var e=/%s/;var f=/%x\.{0,1}(\d{0,})/;var g=/%y\.{0,1}(\d{0,})/;if(typeof b.series.percent!=="undefined"){a=i(d,a,b.series.percent)}if(typeof b.series.label!=="undefined"){a=a.replace(e,b.series.label)}if(typeof c==="function"){a=a.replace(f,c(b.series.data[b.dataIndex][0]))}else if(typeof b.series.data[b.dataIndex][0]==="number"){a=i(f,a,b.series.data[b.dataIndex][0])}if(typeof b.series.data[b.dataIndex][1]==="number"){a=i(g,a,b.series.data[b.dataIndex][1])}return a};var i=function(a,b,c){var d;if(b.match(a)!=="null"){if(RegExp.$1!==""){d=RegExp.$1;c=c.toFixed(d)}b=b.replace(a,c)}return b}};a.plot.plugins.push({init:c,options:b,name:"tooltip",version:"0.4.4"})})(jQuery) -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/js/javascriptrrd/rrdMultiFile.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Combine multiple rrdFiles into one object 3 | * It implements the same interface, but changing the content 4 | * 5 | * Part of the javascriptRRD package 6 | * Copyright (c) 2010 Igor Sfiligoi, isfiligoi@ucsd.edu 7 | * 8 | * Original repository: http://javascriptrrd.sourceforge.net/ 9 | * 10 | * MIT License [http://www.opensource.org/licenses/mit-license.php] 11 | * 12 | */ 13 | 14 | // ============================================================ 15 | // RRD RRA handling class 16 | function RRDRRASum(rra_list,offset_list,treat_undefined_as_zero) { 17 | this.rra_list=rra_list; 18 | this.offset_list=offset_list; 19 | this.treat_undefined_as_zero=treat_undefined_as_zero; 20 | this.row_cnt= this.rra_list[0].getNrRows(); 21 | } 22 | 23 | RRDRRASum.prototype.getIdx = function() { 24 | return this.rra_list[0].getIdx(); 25 | } 26 | 27 | // Get number of rows/columns 28 | RRDRRASum.prototype.getNrRows = function() { 29 | return this.row_cnt; 30 | } 31 | RRDRRASum.prototype.getNrDSs = function() { 32 | return this.rra_list[0].getNrDSs(); 33 | } 34 | 35 | // Get RRA step (expressed in seconds) 36 | RRDRRASum.prototype.getStep = function() { 37 | return this.rra_list[0].getStep(); 38 | } 39 | 40 | // Get consolidation function name 41 | RRDRRASum.prototype.getCFName = function() { 42 | return this.rra_list[0].getCFName(); 43 | } 44 | 45 | RRDRRASum.prototype.getEl = function(row_idx,ds_idx) { 46 | var outSum=0.0; 47 | for (var i in this.rra_list) { 48 | var offset=this.offset_list[i]; 49 | if ((row_idx+offset) undefined*/ 54 | val=undefined; 55 | } 56 | /* treat all undefines as 0 for now */ 57 | if (val==undefined) { 58 | if (this.treat_undefined_as_zero) { 59 | val=0; 60 | } else { 61 | /* if even one element is undefined, the whole sum is undefined */ 62 | outSum=undefined; 63 | break; 64 | } 65 | } 66 | outSum+=val; 67 | } 68 | return outSum; 69 | } 70 | 71 | // Low precision version of getEl 72 | // Uses getFastDoubleAt 73 | RRDRRASum.prototype.getElFast = function(row_idx,ds_idx) { 74 | var outSum=0.0; 75 | for (var i in this.rra_list) { 76 | var offset=this.offset_list[i]; 77 | if ((row_id+offset) undefined*/ 82 | val=undefined; 83 | } 84 | /* treat all undefines as 0 for now */ 85 | if (val==undefined) { 86 | if (this.treat_undefined_as_zero) { 87 | val=0; 88 | } else { 89 | /* if even one element is undefined, the whole sum is undefined */ 90 | outSum=undefined; 91 | break; 92 | } 93 | } 94 | outSum+=val; 95 | } 96 | return outSum; 97 | } 98 | 99 | /*** INTERNAL ** sort by lastupdate, descending ***/ 100 | 101 | function rrdFileSort(f1, f2) { 102 | return f2.getLastUpdate()-f1.getLastUpdate(); 103 | } 104 | 105 | /* 106 | * Sum several RRDfiles together 107 | * They must all have the same DSes and the same RRAs 108 | */ 109 | 110 | function RRDFileSum(file_list,treat_undefined_as_zero) { 111 | if (treat_undefined_as_zero==undefined) { 112 | this.treat_undefined_as_zero=true; 113 | } else { 114 | this.treat_undefined_as_zero=treat_undefined_as_zero; 115 | } 116 | this.file_list=file_list; 117 | this.file_list.sort(); 118 | 119 | // =================================== 120 | // Start of user functions 121 | 122 | this.getMinStep = function() { 123 | return this.file_list[0].getMinStep(); 124 | } 125 | this.getLastUpdate = function() { 126 | return this.file_list[0].getLastUpdate(); 127 | } 128 | 129 | this.getNrDSs = function() { 130 | return this.file_list[0].getNrDSs(); 131 | } 132 | 133 | this.getDSNames = function() { 134 | return this.file_list[0].getDSNames(); 135 | } 136 | 137 | this.getDS = function(id) { 138 | return this.file_list[0].getDS(id); 139 | } 140 | 141 | this.getNrRRAs = function() { 142 | return this.file_list[0].getNrRRAs(); 143 | } 144 | 145 | this.getRRAInfo = function(idx) { 146 | return this.file_list[0].getRRAInfo(idx); 147 | } 148 | 149 | this.getRRA = function(idx) { 150 | var rra_info=this.getRRAInfo(idx); 151 | var rra_step=rra_info.getStep(); 152 | var realLastUpdate=undefined; 153 | 154 | var rra_list=new Array(); 155 | var offset_list=new Array(); 156 | for (var i in this.file_list) { 157 | file=file_list[i]; 158 | fileLastUpdate=file.getLastUpdate(); 159 | if (realLastUpdate!=undefined) { 160 | fileSkrew=Math.floor((realLastUpdate-fileLastUpdate)/rra_step); 161 | } else { 162 | fileSkrew=0; 163 | firstLastUpdate=fileLastUpdate; 164 | } 165 | offset_list.push(fileSkrew); 166 | fileRRA=file.getRRA(idx); 167 | rra_list.push(fileRRA); 168 | } 169 | 170 | return new RRDRRASum(rra_list,offset_list,this.treat_undefined_as_zero); 171 | } 172 | 173 | } 174 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/js/rpimonitor.addons.js: -------------------------------------------------------------------------------- 1 | // This file is part of RPi-Monitor project 2 | // 3 | // Copyright 2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | function ConstructPage() 18 | { 19 | var activePage = GetURLParameter('activePage'); 20 | if (activePage == null){ activePage = 0; } 21 | 22 | data = getData('addons'); 23 | if ( ( typeof activePage == 'undefined') || 24 | ( activePage >= data.length ) 25 | ) 26 | { 27 | activePage = 0 28 | } 29 | if ( data[activePage].showtitle !== 'false' ) { 30 | $('

'+eval(data[activePage].title)+'


').insertBefore("#insertionPoint"); 31 | } 32 | 33 | $("#insertionPoint").load("addons/"+data[activePage].addons+"/"+data[activePage].addons+".html") 34 | 35 | $("head").append(""); 36 | 37 | jQuery.ajax({ 38 | url: "addons/"+data[activePage].addons+"/"+data[activePage].addons+".js", 39 | dataType: "script", 40 | }).done(function() { 41 | }); 42 | 43 | } 44 | 45 | $(function () { 46 | /* Set no cache */ 47 | $.ajaxSetup({ cache: false }); 48 | 49 | /* Show friends */ 50 | ShowFriends(); 51 | 52 | /* Add qrcode shortcut*/ 53 | setupqr(); 54 | doqr(document.URL); 55 | 56 | /* Get static values once */ 57 | ConstructPage(); 58 | }); 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/js/rpimonitor.index.js: -------------------------------------------------------------------------------- 1 | // This file is part of RPi-Monitor project 2 | // 3 | // Copyright 2013 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | $(function () { 18 | ShowFriends(); 19 | /* Add qrcode shortcut*/ 20 | setupqr(); 21 | doqr(document.URL); 22 | }); 23 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/statistics.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | RPi-Monitor 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 |
43 |
44 |
45 | 46 | 47 | 48 |
49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/usr/share/rpimonitor/web/status.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | RPi-Monitor 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 |
43 |
44 |
45 |
46 | 47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/var/lib/rpimonitor/updatestatus.txt: -------------------------------------------------------------------------------- 1 | Update needed...

    Execute sudo /etc/init.d/rpimonitor update to update this data.
    To add or remove automatic update of this data, execute
    sudo /etc/init.d/rpimonitor install_auto_package_status_update or
    sudo /etc/init.d/rpimonitor remove_auto_package_status_update.
2 | -------------------------------------------------------------------------------- /tools/addnginxuser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$(id -u)" != "0" ]; then 4 | echo "This script must be run as root" 5 | exit 1 6 | fi 7 | 8 | echo -n "Enter new username: "; read user 9 | echo -n "Enter new password: "; read pass 10 | 11 | printf "$user:$(openssl passwd -crypt $pass)\n" >> /etc/nginx/.htpasswd 12 | -------------------------------------------------------------------------------- /tools/conf2man.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # (c) 2013 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | # 17 | @ARGV or die "USAGE: $0 [conf] [version] | gzip -c > program.1.gz"; 18 | 19 | my $conf=shift or die "You must specify the configuration file to open\n"; 20 | -f $conf or die "$conf is not existing\n"; 21 | my $version=shift or die "You must specify the version\n"; 22 | 23 | my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); 24 | my $datestring = sprintf("%4d-%02d-%02d",($year + 1900),($mon+1),$mday); 25 | 26 | print ".\" Manpage for generated by conf2man.pl.\n"; 27 | $conf =~ /([^\/]+)$/; 28 | print ".TH man 5 \"$datestring\" \"$version\" \"$1 man page\"\n"; 29 | open(FILE, "$conf") 30 | or die "Can't open $conf\n"; 31 | while () { 32 | /#$/ or /# / or /^$/ or next; 33 | s/(# |^#*#$)//g; 34 | /^\S\w/ and print ".SH "; 35 | print "$_"; 36 | } 37 | close(FILE); 38 | -------------------------------------------------------------------------------- /tools/help2man.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # (c) 2013 - Xavier Berger - http://rpi-experiences.blogspot.fr/ 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | # 17 | @ARGV or die "USAGE: $0 [program] [version] | gzip -c > program.5.gz"; 18 | 19 | my $program=shift or die "You must specify the program to execute\n"; 20 | -f $program or die "$program is not existing\n"; 21 | my $version=shift or die "You must specify the version\n"; 22 | 23 | my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); 24 | my $datestring = sprintf("%4d-%02d-%02d",($year + 1900),($mon+1),$mday); 25 | 26 | print ".\" Manpage for generated by help2man.pl.\n"; 27 | $program =~ /(\w+)$/; 28 | print ".TH man 1 \"$datestring\" \"$version\" \"$1 man page\"\n"; 29 | open(FILE, "$program --help 2>&1 |") 30 | or die "Can't open $program\n"; 31 | while () { 32 | /^\S/ and print ".SH "; 33 | print "$_"; 34 | } 35 | close(FILE); 36 | -------------------------------------------------------------------------------- /tools/make_ca.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Extracted from http://zepala.free.fr/?q=book/export/html/49 3 | 4 | # We are deleting all that has been previously created 5 | # since the data of the old CA ROOT will no more be valid 6 | rm -Rf sslcert 7 | 8 | # Create a new base directory 9 | mkdir sslcert 10 | chmod 700 sslcert 11 | 12 | # Lets go inside the directory 13 | cd sslcert 14 | 15 | # We create the sub directories 16 | mkdir certs private public db 17 | chmod 700 certs private public db 18 | 19 | # Creating the database 20 | echo "000001" > db/serial 21 | touch db/certindex.txt 22 | 23 | # Creation of the CA ROOT key 24 | openssl req -new -x509 -extensions v3_ca -keyout private/cakey.pem -days 3650 -out public/cacert.pem -config ../openssl.cnf 25 | 26 | # Display the create CA ROOT key 27 | openssl x509 -in public/cacert.pem -text 28 | -------------------------------------------------------------------------------- /tools/make_cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Extracted from http://zepala.free.fr/?q=book/export/html/49 3 | 4 | if [ -z "$1" ] 5 | then 6 | echo "" 7 | echo "Usage :" 8 | echo "" 9 | echo " $0 \"name_of_certificat\"" 10 | echo "" 11 | exit 0 12 | fi 13 | 14 | echo "" 15 | echo "Select certificat type:" 16 | echo "" 17 | echo " 1) Server Certificat" 18 | echo " 2) Client Certificat (Default)" 19 | echo "" 20 | echo -n "Your choice : " 21 | read CERT 22 | 23 | if [ "${CERT}" != "1" ]; then 24 | CERT="2" 25 | fi 26 | 27 | echo "Creating certificat $1.pem" 28 | 29 | # We go into the subdirectory 30 | cd sslcert 31 | 32 | # Creating key and signature request 33 | echo "" 34 | echo -n "**** Creating " 35 | if [ "${CERT}" == "1" ]; then 36 | echo -n "server " 37 | fi 38 | echo " key and signature request" 39 | openssl req -new -nodes -out public/$1-req.pem -keyout private/$1-key.pem -config ../openssl.cnf 40 | 41 | # Signing key 42 | echo "" 43 | echo "**** Signing key" 44 | if [ "${CERT}" == "1" ]; then 45 | openssl ca -out public/$1-cert.pem -extensions server -config ../openssl.cnf -infiles public/$1-req.pem 46 | fi 47 | if [ "${CERT}" == "2" ]; then 48 | openssl ca -out public/$1-cert.pem -extensions v3_req -config ../openssl.cnf -infiles public/$1-req.pem 49 | fi 50 | 51 | echo "**** Exporting kay" 52 | openssl pkcs12 -export -in public/$1-cert.pem -inkey private/$1-key.pem -out public/$1-bundle.p12 53 | 54 | echo "" 55 | echo "**** Show created" 56 | # Affichage de la clé 57 | openssl x509 -in public/$1-cert.pem -text 58 | -------------------------------------------------------------------------------- /tools/netTraffic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## 3 | ##This script return the bandwidth in Rx and Tx by substract old Rx/Tx values by the new ones. 4 | ##Ex: If the script is called every 10s, it will compare the rx_bytes 10s ago (old_rx) with the new one (rx) and substract these two values to get a value as Bytes/10S 5 | ## 6 | ## Author : TDUVAL 7 | 8 | # Location of the networkTraffic files 9 | LOCATION="/usr/share/rpimonitor/web/custom/net_traffic/" 10 | 11 | # Test if directory $path exist then create it 12 | if [ ! -d $LOCATION ] 13 | then mkdir $LOCATION 14 | fi 15 | 16 | # Test if file rx exist then create it 17 | if [ ! -f $LOCATION/rx ] 18 | then touch $LOCATION/rx 19 | fi 20 | 21 | # Test if file tx exist then create it 22 | if [ ! -f $LOCATION/tx ] 23 | then touch $LOCATION/tx 24 | fi 25 | 26 | # Get old values in rx/tx files 27 | OLDRX=`cat $LOCATION/rx` 28 | OLDTX=`cat $LOCATION/tx` 29 | 30 | # Get new values 31 | RX=`cat /sys/class/net/eth0/statistics/rx_bytes` 32 | TX=`cat /sys/class/net/eth0/statistics/tx_bytes` 33 | 34 | # Store new values in rx/tx files 35 | echo $RX > $LOCATION/rx 36 | echo $TX > $LOCATION/tx 37 | 38 | # Substract new - old to get traffic in Bytes/period 39 | RX_TRAFFIC=$(($RX-$OLDRX)) 40 | TX_TRAFFIC=$(($TX-$OLDTX)) 41 | 42 | # Display traffic value in stdout 43 | echo -e "rx=$RX_TRAFFIC\ntx=$TX_TRAFFIC" 44 | -------------------------------------------------------------------------------- /tools/openssl.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # OpenSSL configuration file. 3 | # Extracted from http://zepala.free.fr/?q=book/export/html/49 4 | # 5 | 6 | # Establish working directory. 7 | dir = . 8 | 9 | [ ca ] 10 | default_ca = CA_default 11 | 12 | [ CA_default ] 13 | serial = $dir/db/serial 14 | database = $dir/db/certindex.txt 15 | new_certs_dir = $dir/certs 16 | certificate = $dir/public/cacert.pem 17 | private_key = $dir/private/cakey.pem 18 | default_days = 365 19 | default_md = sha256 20 | preserve = no 21 | email_in_dn = no 22 | nameopt = default_ca 23 | certopt = default_ca 24 | policy = policy_match 25 | 26 | [ policy_match ] 27 | #countryName = match 28 | #stateOrProvinceName = match 29 | #organizationName = match 30 | countryName = supplied 31 | stateOrProvinceName = supplied 32 | organizationName = supplied 33 | organizationalUnitName = optional 34 | commonName = supplied 35 | emailAddress = optional 36 | 37 | [ req ] 38 | default_bits = 2048 # Size of keys 39 | default_keyfile = key.pem # name of generated keys 40 | default_md = sha256 # message digest algorithm 41 | string_mask = nombstr # permitted characters 42 | distinguished_name = req_distinguished_name 43 | x509_extensions = v3_req 44 | 45 | [ req_distinguished_name ] 46 | # Variable name Prompt string 47 | #------------------------- ---------------------------------- 48 | countryName = Country Name (2 letter code) 49 | countryName_min = 2 50 | countryName_max = 2 51 | stateOrProvinceName = State or Province Name (full name) 52 | localityName = Locality Name (city, district) 53 | organizationName = Organization Name (company) 54 | organizationName_max = 64 55 | organizationalUnitName = Organizational Unit Name (department, division) 56 | organizationalUnitName_max = 64 57 | commonName = Common Name (hostname, IP, or your name) 58 | commonName_max = 64 59 | emailAddress = Email Address 60 | emailAddress_max = 40 61 | 62 | # Default values for the above, for consistency and less typing. 63 | # Variable name Value 64 | #------------------------ ------------------------------ 65 | countryName_default = FR 66 | stateOrProvinceName_default = France 67 | localityName_default = Grenoble 68 | organizationName_default = RPi-Experiences 69 | organizationalUnitName_default = www 70 | commonName_default = RPi-Monitor 71 | emailAddress_default = root@localhost 72 | 73 | [ v3_ca ] 74 | nsComment = "RPi-Experiences Certificate Authority" 75 | basicConstraints = CA:TRUE 76 | subjectKeyIdentifier = hash 77 | authorityKeyIdentifier = keyid:always,issuer:always 78 | 79 | [ v3_req ] 80 | nsComment = "Certificate delivered by RPi-Experiences." 81 | basicConstraints = CA:FALSE 82 | subjectKeyIdentifier = hash 83 | subjectAltName = @ALTNAMES 84 | 85 | [ server ] 86 | nsComment = "Certificate delivered by RPi-Experiences." 87 | basicConstraints = CA:FALSE 88 | subjectKeyIdentifier = hash 89 | subjectAltName = @ALTNAMES 90 | nsCertType = server 91 | authorityKeyIdentifier = keyid:always,issuer:always 92 | keyUsage = digitalSignature, keyEncipherment 93 | extendedKeyUsage = serverAuth 94 | 95 | [ALTNAMES] 96 | DNS.1 = localhost 97 | DNS.2 = raspberrypi 98 | DNS.3 = RPiIpAddress 99 | DNS.4 = pi 100 | IP.1 = 0.0.0.0 101 | IP.2 = 127.0.0.1 102 | IP.3 = 192.168.0.123 103 | -------------------------------------------------------------------------------- /tools/reverseproxy: -------------------------------------------------------------------------------- 1 | access_log off; 2 | add_header Cache-Control public; 3 | # do not show server version, avoid information leak and exploids 4 | server_tokens off; 5 | 6 | # Security HTTP headers 7 | # test service: https://securityheaders.com/ 8 | # Allow to use frame from same origin 9 | add_header X-Frame-Options "SAMEORIGIN" always; 10 | # Enable buildin XSS protection in browser 11 | add_header X-Xss-Protection "1; mode=block" always; 12 | # Disable Content sniffing 13 | add_header X-Content-Type-Options "nosniff" always; 14 | # Disable referrer to avoid information leak to other sides 15 | add_header Referrer-Policy "no-referrer" always; 16 | 17 | # HTTP 80 18 | server { 19 | listen 80; 20 | #Force the usage of https 21 | rewrite ^ https://$host$request_uri? permanent; 22 | } 23 | 24 | # HTTPS 443 25 | server { 26 | listen 443 ssl http2; 27 | keepalive_timeout 70; 28 | 29 | # SSL config 30 | ssl on; 31 | ssl_certificate /etc/ssl/localcerts/RPi-Experiences-cert.pem; 32 | ssl_certificate_key /etc/ssl/localcerts/RPi-Experiences-key.pem; 33 | 34 | ssl_session_timeout 1d; 35 | ssl_session_cache shared:SSL:50m; 36 | ssl_session_tickets off; 37 | 38 | # more informations: 39 | # recomendations: https://mozilla.github.io/server-side-tls/ssl-config-generator/ 40 | # test service: https://www.ssllabs.com/ssltest/ 41 | # SSLv3 is broken, do not enable; TLSv1 TLSv1.1 are not recomended 42 | # works with modern 43 | ssl_protocols TLSv1.2; 44 | 45 | # RC4 is brokenm, do not enable 46 | ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; 47 | ssl_prefer_server_ciphers on; 48 | 49 | # strict ssl connection 50 | add_header Strict-Transport-Security "max-age=31536000;"; 51 | 52 | # DDOS protection - Tune Values or deactivate in case of issue 53 | # limit_conn conn_limit_per_ip 20; 54 | # limit_req zone=req_limit_per_ip burst=20 nodelay; 55 | 56 | # Proxy Config 57 | proxy_redirect off; 58 | proxy_set_header Host $host; 59 | proxy_set_header X-Real-IP $remote_addr; 60 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 61 | client_max_body_size 10m; 62 | client_body_buffer_size 128k; 63 | proxy_connect_timeout 90; 64 | proxy_send_timeout 90; 65 | proxy_read_timeout 90; 66 | proxy_buffers 32 4k; 67 | 68 | # Define the default site 69 | location / { 70 | rewrite ^ /rpimonitor/ permanent; 71 | } 72 | 73 | location /rpimonitor/ { 74 | proxy_pass http://localhost:8888; 75 | auth_basic "Access Restricted"; 76 | auth_basic_user_file "/etc/nginx/.htpasswd"; 77 | access_log /var/log/nginx/rpimonitor.access.log; 78 | error_log /var/log/nginx/rpimonitor.error.log; 79 | } 80 | 81 | location /shellinabox/ { 82 | proxy_pass http://localhost:4200; 83 | auth_basic "Access Restricted"; 84 | auth_basic_user_file "/etc/nginx/.htpasswd"; 85 | access_log /var/log/nginx/shellinabox.access.log; 86 | error_log /var/log/nginx/shellinabox.error.log; 87 | } 88 | } 89 | 90 | --------------------------------------------------------------------------------