configure collectd

This commit is contained in:
2025-01-03 09:42:20 +01:00
parent b8471944b0
commit d967b73db4
18 changed files with 314 additions and 1162 deletions

View File

@@ -1,10 +1,11 @@
#!/usr/bin/env python
#!/usr/bin/python3
import sys
import os
import requests
import re
import time
import datetime
import sys
import random
collection = 'funds'
@@ -55,7 +56,7 @@ def morningstar_ticker(funds):
def put_value(fund, value, timestamp = 'N'):
print('PUTVAL {}/exec-fund-{}/gauge-ticker interval={} {}:{}'.format(collection, fund, interval, timestamp, value))
sys.stdout.flush()
if timestamp is 'N':
if timestamp == 'N':
timestamp = int(time.time())
# log.write('{},{},{}\n'.format(fund, timestamp, int(value)))