Disable recording while testing.
This commit is contained in:
parent
6e2c115dd2
commit
41bd4e1465
@ -132,14 +132,14 @@ def sensors_polling(poller_conf):
|
|||||||
try:
|
try:
|
||||||
for metric in poller_conf['metrics']:
|
for metric in poller_conf['metrics']:
|
||||||
logger.debug('Posting data for '+metric['name'])
|
logger.debug('Posting data for '+metric['name'])
|
||||||
r = s.post(post_url[metric['type']],
|
#r = s.post(post_url[metric['type']],
|
||||||
headers={'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0',
|
# headers={'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0',
|
||||||
'X-API-KEY': recording_api_key},
|
# 'X-API-KEY': recording_api_key},
|
||||||
json={'metric': metric['name'],
|
# json={'metric': metric['name'],
|
||||||
'value': last_data[metric['name']]['value'],
|
# 'value': last_data[metric['name']]['value'],
|
||||||
'time': utc_now.isoformat()})
|
# 'time': utc_now.isoformat()})
|
||||||
if r.status_code != 201:
|
#if r.status_code != 201:
|
||||||
logger.error(str(r.status_code)+" "+r.reason)
|
# logger.error(str(r.status_code)+" "+r.reason)
|
||||||
# It has to be current_time variable so the interval check works correctly
|
# It has to be current_time variable so the interval check works correctly
|
||||||
last_recording_time=current_time
|
last_recording_time=current_time
|
||||||
logger.debug('last_recording_time: '+str(last_recording_time))
|
logger.debug('last_recording_time: '+str(last_recording_time))
|
||||||
|
Loading…
Reference in New Issue
Block a user