2022-11-02 22:39:54 +01:00
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
2017-01-05 23:37:07 +01:00
2022-11-02 22:39:54 +01:00
# Monitorix for YunoHost
2017-12-15 22:04:45 +01:00
2023-01-22 03:13:41 +01:00
[![Integration level ](https://dash.yunohost.org/integration/monitorix.svg )](https://dash.yunohost.org/appci/app/monitorix) ![Working status ](https://ci-apps.yunohost.org/ci/badges/monitorix.status.svg ) ![Maintenance status ](https://ci-apps.yunohost.org/ci/badges/monitorix.maintain.svg )
2022-11-02 22:39:54 +01:00
[![Install Monitorix with YunoHost ](https://install-app.yunohost.org/install-with-yunohost.svg )](https://install-app.yunohost.org/?app=monitorix)
2017-12-15 22:04:45 +01:00
2022-11-02 22:39:54 +01:00
*[Lire ce readme en français.](./README_fr.md)*
2017-12-15 22:04:45 +01:00
2022-11-02 22:39:54 +01:00
> *This package allows you to install Monitorix quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide ](https://yunohost.org/#/install ) to learn how to install it.*
2017-01-05 23:37:07 +01:00
2022-11-02 22:39:54 +01:00
## Overview
2017-01-05 23:37:07 +01:00
2022-11-02 22:39:54 +01:00
Monitorix is a free, open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used under production Linux/UNIX servers, but due to its simplicity and small size can be used on embedded devices as well.
2018-06-07 14:57:16 +02:00
2022-12-21 06:19:15 +01:00
**Shipped version:** 3.15.0~ynh2
2018-01-13 22:03:13 +01:00
2022-11-02 22:39:54 +01:00
**Demo:** https://www.fibranet.cat/monitorix/
2018-01-13 22:03:13 +01:00
2022-11-02 22:39:54 +01:00
## Screenshots
2017-01-05 23:37:07 +01:00
2022-11-02 22:39:54 +01:00
![Screenshot of Monitorix ](./doc/screenshots/mail.png )
2018-06-07 14:57:16 +02:00
2022-11-02 22:39:54 +01:00
## Disclaimers / important information
2018-06-07 14:57:16 +02:00
2022-11-02 23:09:05 +01:00
### Upgrade
By default, a backup is performed before upgrading. To avoid this, you have the following options:
- Pass the `NO_BACKUP_UPGRADE` env variable with `1` at each upgrade. For example `NO_BACKUP_UPGRADE=1 yunohost app upgrade monitorix` .
- Set `disable_backup_before_upgrade` to `1` . You can set it with this command:
`yunohost app setting monitorix disable_backup_before_upgrade -v 1`
After that, the settings will be applied for **all** the next updates.
From command line:
`yunohost app upgrade monitorix`
### Backup
This application now uses the core-only feature of the backup. To keep the integrity of the data and to have a better guarantee of the restoration it is recommended to proceed as follows:
2022-11-04 07:51:42 +01:00
- Stop Monitorix service with this command:
2022-11-02 23:09:05 +01:00
`systemctl stop monitorix.service`
2022-11-04 07:51:42 +01:00
- Launch Monitorix backup with this command:
2022-11-02 23:09:05 +01:00
`yunohost backup create --app monitorix`
- Backup your data with your specific strategy (could be with rsync, borg backup or just cp). The data is generally stored in `/var/lib/monitorix` .
2022-11-04 07:51:42 +01:00
- Restart Monitorix service with theses command:
2022-11-02 23:09:05 +01:00
`systemctl start monitorix.service`
### Remove
Due of the backup core only feature the data directory in `/var/lib/monitorix` **is not removed** . It must be manually deleted to purge user data from the app.
2018-06-07 14:57:16 +02:00
### More sensor
2017-01-05 23:37:07 +01:00
If you want to see the temperature of some sensor you can install the `lm-sensor` packet. For disk temperature you can instal the `hddtemp` packet.
2018-06-07 14:57:16 +02:00
### Custom config
2017-01-05 23:37:07 +01:00
2017-10-13 18:20:09 +02:00
If you want do custom the monitorix config for more personnal information you can add a file in `/etc/monitorix/conf.d/` . This config file will be overwritte the original config in `/etc/monitorix/monitorix.conf` .
2018-06-07 14:57:16 +02:00
You will have a full complete documentation for monitorix config here : https://www.monitorix.org/documentation.html
By example you can extends the basic config by this :
```
priority = 5
< graph_enable >
disk = y
lmsens = y
gensens = y
mail = y
< / graph_enable >
# LMSENS graph
# -----------------------------------------------------------------------------
< lmsens >
< list >
core0 = temp1
2022-11-02 23:09:05 +01:00
core1 =
mb0 =
2018-06-07 14:57:16 +02:00
cpu0 =
fan0 =
fan1 =
fan2 =
volt0 =
volt1 =
volt2 =
2022-11-02 23:09:05 +01:00
volt3 =
2018-06-07 14:57:16 +02:00
volt4 =
2022-11-02 23:09:05 +01:00
volt5 =
volt6 =
2018-06-07 14:57:16 +02:00
volt7 =
< / list >
2022-11-02 23:09:05 +01:00
< / lmsns >
2018-06-07 14:57:16 +02:00
# GENSENS graph
# -----------------------------------------------------------------------------
< gensens >
< list >
0 = cpu_temp
1 = cpu0_freq, cpu1_freq, cpu2_freq, cpu3_freq
< / list >
< desc >
cpu_temp = /sys/class/thermal/thermal_zone0/temp
cpu0_freq = /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
cpu1_freq = /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
cpu2_freq = /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq
cpu3_freq = /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq
< / desc >
< unit >
cpu_temp = 1000
cpu0_freq = 0.001
cpu1_freq = 0.001
cpu2_freq = 0.001
cpu3_freq = 0.001
< / unit >
< map >
cpu_temp = CPU Temperature
cpu0_freq = CPU 0 Frequency
cpu1_freq = CPU 1 Frequency
cpu2_freq = CPU 2 Frequency
cpu3_freq = CPU 3 Frequency
< / map >
< alerts >
cpu_temp = 300, 65, /etc/monitorix/monitorix_alerts_scripts/cpu_temp.sh
< / alerts >
< / gensens >
# DISK graph
# -----------------------------------------------------------------------------
< disk >
< list >
0 = /dev/sda
< / list >
< alerts >
realloc_enabled = y
realloc_timeintvl = 0
realloc_threshold = 1
realloc_script = /etc/monitorix/monitorix_alerts_scripts/disk_realloc.sh
pendsect_enabled = y
pendsect_timeintvl = 0
pendsect_threshold = 1
pendsect_script = /etc/monitorix/monitorix_alerts_scripts/disk_pendsect.sh
< / alerts >
< / disk >
# FS graph
# -----------------------------------------------------------------------------
< fs >
< list >
2022-11-02 22:39:54 +01:00
0 = /, /home, /var, /$tempdir, swap
2018-06-07 14:57:16 +02:00
< / list >
2022-11-02 23:09:05 +01:00
< desc >
2018-06-07 14:57:16 +02:00
/ = Root FS
/home = home
/var = var
2022-11-02 22:39:54 +01:00
/$tempdir = tmp
2018-06-07 14:57:16 +02:00
< / desc >
< devmap >
< / devmap >
rigid = 2, 0, 2, 0
limit = 100, 1000, 100, 1000
< alerts >
/ = 3600, 98, /etc/monitorix/monitorix_alerts_scripts/fs_rootfs.sh
/home = 3600, 98, /etc/monitorix/monitorix_alerts_scripts/fs_home.sh
/var = 3600, 98, /etc/monitorix/monitorix_alerts_scripts/fs_var.sh
2022-11-02 22:39:54 +01:00
/$tempdir = 3600, 98, /etc/monitorix/monitorix_alerts_scripts/fs_tmp.sh
2018-06-07 14:57:16 +02:00
swap = 3600, 98, /etc/monitorix/monitorix_alerts_scripts/fs_swap.sh
< / alerts >
< / fs >
# MAIL graph
# -----------------------------------------------------------------------------
< mail >
mta = postfix
greylist = postgrey
stats_rate = real
rigid = 0, 0, 0, 0, 0
limit = 1, 1000, 1000, 1000, 1000
< alerts >
delvd_enabled = y
delvd_timeintvl = 60
delvd_threshold = 100
delvd_script = /etc/monitorix/monitorix_alerts_scripts/mail_delvd.sh
mqueued_enabled = y
mqueued_timeintvl = 3600
mqueued_threshold = 100
mqueued_script = /etc/monitorix/monitorix_alerts_scripts/mail_mqueued.sh
< / alerts >
< / mail >
# NET graph
# -----------------------------------------------------------------------------
< net >
list = eth0,lo
< desc >
eth0 = FastEthernet LAN, 0, 10000000
lo = loopback, 0, 10000000
< / desc >
gateway = eth0
< / net >
# PROCESS graph
# -----------------------------------------------------------------------------
< process >
< list >
0 = sshd, ntpd, monitorix, monitorix-httpd
1 = openvpn, ...
...
6 = mysqld, slapd, postgresql
< / list >
< desc >
master = Postfix
imap = Dovecot
< / desc >
rigid = 2, 0, 0, 0, 0, 0, 0, 0
limit = 100, 1000, 1000, 1000, 1000, 1000, 1000, 1000
< / process >
< emailreports >
enabled = y
url_prefix = http://127.0.0.1:8081/monitorix
smtp_hostname = localhost
from_address = noreply@domain.tld
hour = 2
minute = 7
< daily >
enabled = y
graphs = system, fs, gensens, disk, netstat, port, nginx
to = user@domain.tld
< / daily >
< weekly >
enabled = y
graphs = system, fs, gensens, disk, kern, proc, net, netstat, process, serv, port, user, nginx, mysql, fail2ban, int
to = user@domain.tld
< / weekly >
< monthly >
enabled = y
graphs = system, fs, gensens, disk, kern, proc, net, netstat, process, serv, port, user, nginx, mysql, fail2ban, int
to = user@domain.tld
< / monthly >
< yearly >
enabled = y
graphs = system, fs, gensens, disk, kern, proc, net, netstat, process, serv, port, user, nginx, mysql, fail2ban, int
to = user@domain.tld
< / yearly >
< / emailreports >
```
In this config we have :
- We set the process priority to 5 (which mean that it will be lower priority than the other process).
- We get the lmsensor sensor data.
- We get some sensors data not accessible with lmsensor (with gensens)
- We check the disk health and send an email if any error happens. For that you need to make some script. An example is available in `/usr/share/doc/monitorix/monitorix-alert.sh` .
- We check the filesystem.
- We check the traffic in the network card.
- We check some process.
- We send every day, week, month and year a rapport.
2022-11-02 22:39:54 +01:00
## Documentation and resources
2018-06-07 14:57:16 +02:00
2022-11-02 22:39:54 +01:00
* Official app website: < http: // monitorix . org >
* Official admin documentation: < https: // www . monitorix . org / documentation . html >
* Upstream app code repository: < https: // github . com / mikaku / Monitorix >
* YunoHost documentation for this app: < https: // yunohost . org / app_monitorix >
* Report a bug: < https: // github . com / YunoHost-Apps / monitorix_ynh / issues >
2018-06-07 14:57:16 +02:00
2022-11-02 22:39:54 +01:00
## Developer info
2018-06-07 14:57:16 +02:00
2022-11-02 22:39:54 +01:00
Please send your pull request to the [testing branch ](https://github.com/YunoHost-Apps/monitorix_ynh/tree/testing ).
2018-06-07 14:57:16 +02:00
To try the testing branch, please proceed like that.
2022-11-02 22:39:54 +01:00
``` bash
2018-06-07 14:57:16 +02:00
sudo yunohost app install https://github.com/YunoHost-Apps/monitorix_ynh/tree/testing --debug
or
sudo yunohost app upgrade monitorix -u https://github.com/YunoHost-Apps/monitorix_ynh/tree/testing --debug
```
2022-11-02 22:39:54 +01:00
**More info regarding app packaging:** < https: / / yunohost . org / packaging_apps >