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"))