mirror of
https://codeberg.org/privacy1st/de-p1st-monitor
synced 2024-12-11 21:57:50 +01:00
removed bundled config files
This commit is contained in:
parent
e8e3e72a63
commit
6360a4f062
@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/de/p1st/monitor/main.py" />
|
||||
<option name="PARAMETERS" value="-c $PROJECT_DIR$/src/de/p1st/monitor/data/yodaTux.ini --export" />
|
||||
<option name="PARAMETERS" value="-c $PROJECT_DIR$/example.ini --export" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
10
README.md
10
README.md
@ -23,12 +23,18 @@ Lines of code including docstrings and comments:
|
||||
|
||||
```shell
|
||||
find ./src -name '*.py' | xargs wc -l
|
||||
#=> 1625 total
|
||||
#=> 1938 total
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
See [yodaTux.ini](src/de/p1st/monitor/data/yodaTux.ini) for a configuration file covering all config options.
|
||||
The configuration is selected in the following order:
|
||||
- Given as CLI argument
|
||||
- Located at `/etc/de-p1st-monitor/${hostname}.ini`
|
||||
|
||||
See [example.ini](example.ini) for a configuration file covering all config options.
|
||||
|
||||
More examples can be found at https://codeberg.org/privacy1st/nix-git/src/branch/main/assets/de-p1st-monitor.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -5,6 +5,10 @@ dir = /var/log/de-p1st-monitor/
|
||||
|
||||
[temp.1]
|
||||
; `sensor` and `label` are used to identify one temperature value.
|
||||
; You find these values by running:
|
||||
; $ python3
|
||||
; $ import psutil
|
||||
; $ psutil.sensors_temperatures(fahrenheit=False)
|
||||
sensor = k10temp
|
||||
label = Tctl
|
||||
|
||||
@ -25,6 +29,7 @@ warn_data_range = 4
|
||||
|
||||
|
||||
[network.1]
|
||||
; You can list your network interfaces with `ip link show`.
|
||||
network_interface = wlan0
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[metadata]
|
||||
name = de.p1st.monitor
|
||||
version = 0.11.5
|
||||
version = 0.12.0
|
||||
author = Daniel Langbein
|
||||
author_email = daniel@systemli.org
|
||||
description = periodically monitor and warn
|
||||
|
@ -23,11 +23,11 @@ def init_cfg(config_file: Path = None):
|
||||
config_file = None
|
||||
|
||||
# Otherwise, use packaged config file.
|
||||
if config_file is None:
|
||||
pkg = importlib_resources.files('de.p1st.monitor')
|
||||
config_file = pkg / 'data' / f'{hostname}.ini'
|
||||
if not config_file.is_file():
|
||||
config_file = None
|
||||
# if config_file is None:
|
||||
# pkg = importlib_resources.files('de.p1st.monitor')
|
||||
# config_file = pkg / 'data' / f'{hostname}.ini'
|
||||
# if not config_file.is_file():
|
||||
# config_file = None
|
||||
|
||||
if config_file is None or not config_file.is_file():
|
||||
raise Exception(f'Configuration file does not exist! {config_file}')
|
||||
|
@ -1,38 +0,0 @@
|
||||
[logging]
|
||||
dir = /var/log/de-p1st-monitor/
|
||||
|
||||
[filesystem.1]
|
||||
mountpoint = /
|
||||
warn_if_above = 0.75
|
||||
[filesystem.2]
|
||||
mountpoint = /boot
|
||||
warn_if_above = 0.75
|
||||
; TODO
|
||||
|
||||
[memory]
|
||||
warn_if_above = 0.85
|
||||
[swap]
|
||||
warn_if_above = 0.85
|
||||
|
||||
[cpu1]
|
||||
warn_if_above = 2.0
|
||||
warn_threshold = 2
|
||||
warn_data_range = 2
|
||||
[cpu5]
|
||||
warn_if_above = 1.5
|
||||
warn_threshold = 2
|
||||
warn_data_range = 2
|
||||
[cpu15]
|
||||
warn_if_above = 1.0
|
||||
warn_threshold = 2
|
||||
warn_data_range = 2
|
||||
|
||||
; TODO coretemp
|
||||
|
||||
; TODO network
|
||||
|
||||
[drive_temp.1]
|
||||
; HDD drives
|
||||
; TODO: 39 warn, 45 limit
|
||||
type = drivetemp
|
||||
warn_if_above = 40
|
@ -1,70 +0,0 @@
|
||||
[logging]
|
||||
dir = /var/log/de-p1st-monitor/
|
||||
|
||||
[filesystem.1]
|
||||
; 256GB2
|
||||
mountpoint = /
|
||||
warn_if_above = 0.75
|
||||
[filesystem.2]
|
||||
; 256GB2
|
||||
mountpoint = /boot
|
||||
warn_if_above = 0.75
|
||||
[filesystem.3]
|
||||
; 12TB1
|
||||
uuid = c385a436-0288-486f-a2b9-c64c2db667e7
|
||||
warn_if_above = 0.66
|
||||
[filesystem.4]
|
||||
; 3TB1, 3TB2 and 4TB1
|
||||
uuid = 1f560eeb-a375-457b-84a6-93d771a5ba5f
|
||||
warn_if_above = 0.85
|
||||
unmounted_ok = true
|
||||
|
||||
[memory]
|
||||
warn_if_above = 0.85
|
||||
[swap]
|
||||
warn_if_above = 0.85
|
||||
|
||||
[cpu1]
|
||||
warn_if_above = 3.0
|
||||
warn_threshold = 2
|
||||
warn_data_range = 2
|
||||
[cpu5]
|
||||
warn_if_above = 2.0
|
||||
warn_threshold = 2
|
||||
warn_data_range = 2
|
||||
[cpu15]
|
||||
warn_if_above = 1.0
|
||||
warn_threshold = 2
|
||||
warn_data_range = 2
|
||||
|
||||
[temp.1]
|
||||
sensor = coretemp
|
||||
label = Package id 0
|
||||
warn_if_above = 60
|
||||
[temp.2]
|
||||
sensor = coretemp
|
||||
label = Core 0
|
||||
warn_if_above = 60
|
||||
[temp.3]
|
||||
sensor = coretemp
|
||||
label = Core 1
|
||||
warn_if_above = 60
|
||||
|
||||
[network.1]
|
||||
network_interface = enp0s31f6
|
||||
|
||||
[drive_temp.1]
|
||||
; NVMe drives
|
||||
; TODO: 49 warn, 55 limit
|
||||
type = nvme
|
||||
warn_if_above = 50
|
||||
[drive_temp.2]
|
||||
; HDD drives
|
||||
; TODO: 39 warn, 45 limit
|
||||
type = drivetemp
|
||||
warn_if_above = 40
|
||||
|
||||
; [sensor_script.1]
|
||||
; cmd = ["digitemp_DS9097", "-q", "-c", "/home/yoda/.digitemprc", "-t", "0"]
|
||||
; name = room-temp
|
||||
; warn_if_above = 32
|
Loading…
Reference in New Issue
Block a user