From 965d1c402e2aa49e2e0ec2baafdd0c32dac7b29e Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Mon, 5 Feb 2024 00:21:47 +0100 Subject: [PATCH] Rename things. --- conf-example.yml | 3 ++- get-teleinfo.py => read_teleinfo.py | 0 sensors-polling.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename get-teleinfo.py => read_teleinfo.py (100%) diff --git a/conf-example.yml b/conf-example.yml index a206656..63f7460 100644 --- a/conf-example.yml +++ b/conf-example.yml @@ -7,7 +7,8 @@ polling_conf: type: int - name: Modane_elec_energy_index type: int - script: ./get-teleinfo.py + # The output of the command must be a JSON dict with metrics name as keys and metrics value as value. + executable: ./read_teleinfo.py arguments: - "-f" - "custom_json" diff --git a/get-teleinfo.py b/read_teleinfo.py similarity index 100% rename from get-teleinfo.py rename to read_teleinfo.py diff --git a/sensors-polling.py b/sensors-polling.py index ef694c9..da60be9 100755 --- a/sensors-polling.py +++ b/sensors-polling.py @@ -81,7 +81,7 @@ def sensors_polling(poller_conf): # Polling try: logging.debug('Getting data for '+poller_conf['name']) - command = [poller_conf['script']] + poller_conf['arguments'] + command = [poller_conf['executable']] + poller_conf['arguments'] returned_output = subprocess.check_output(command) data = json.loads(returned_output.decode("utf-8")) logging.debug('Got: '+returned_output.decode("utf-8"))