diff --git a/collectd_plugin.py b/collectd_plugin.py index a714086..828785e 100644 --- a/collectd_plugin.py +++ b/collectd_plugin.py @@ -48,10 +48,10 @@ while True: if http_noopen_match: http_current_transfers, http_current_users = 0, 0 - print("PUTVAL \"{}/shares/gague-smb_open_connections\" interval={} N:{}".format(HOSTNAME, INTERVAL, smb_current_users)) - print("PUTVAL \"{}/shares/gague-smb_active_users\" interval={} N:{}".format(HOSTNAME, INTERVAL, smb_active_users)) - print("PUTVAL \"{}/shares/gague-smb_open_files\" interval={} N:{}".format(HOSTNAME, INTERVAL, smb_current_files)) - print("PUTVAL \"{}/shares/gague-http_active_users\" interval={} N:{}".format(HOSTNAME, INTERVAL, http_current_users)) - print("PUTVAL \"{}/shares/gague-http_open_transfers\" interval={} N:{}".format(HOSTNAME, INTERVAL, http_current_transfers)) + print("PUTVAL \"{}/shares/gague-smb_open_connections\" interval={} N:{}".format(HOSTNAME, INTERVAL, smb_current_users), flush=True) + print("PUTVAL \"{}/shares/gague-smb_active_users\" interval={} N:{}".format(HOSTNAME, INTERVAL, smb_active_users), flush=True) + print("PUTVAL \"{}/shares/gague-smb_open_files\" interval={} N:{}".format(HOSTNAME, INTERVAL, smb_current_files), flush=True) + print("PUTVAL \"{}/shares/gague-http_active_users\" interval={} N:{}".format(HOSTNAME, INTERVAL, http_current_users), flush=True) + print("PUTVAL \"{}/shares/gague-http_open_transfers\" interval={} N:{}".format(HOSTNAME, INTERVAL, http_current_transfers), flush=True) time.sleep(INTERVAL)