Rename things.
This commit is contained in:
parent
90e2d074ba
commit
965d1c402e
@ -7,7 +7,8 @@ polling_conf:
|
|||||||
type: int
|
type: int
|
||||||
- name: Modane_elec_energy_index
|
- name: Modane_elec_energy_index
|
||||||
type: int
|
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:
|
arguments:
|
||||||
- "-f"
|
- "-f"
|
||||||
- "custom_json"
|
- "custom_json"
|
||||||
|
@ -81,7 +81,7 @@ def sensors_polling(poller_conf):
|
|||||||
# Polling
|
# Polling
|
||||||
try:
|
try:
|
||||||
logging.debug('Getting data for '+poller_conf['name'])
|
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)
|
returned_output = subprocess.check_output(command)
|
||||||
data = json.loads(returned_output.decode("utf-8"))
|
data = json.loads(returned_output.decode("utf-8"))
|
||||||
logging.debug('Got: '+returned_output.decode("utf-8"))
|
logging.debug('Got: '+returned_output.decode("utf-8"))
|
||||||
|
Loading…
Reference in New Issue
Block a user