Index: snmp__areca_ =================================================================== --- snmp__areca_ (revision 6) +++ snmp__areca_ (revision 11) @@ -202,11 +202,27 @@ print "graph_args " + request_conf[request]["graph"] print "graph_category sensors" - print "graph_order", - print print "host_name", host for dataset in get_data(): - if request == "volt" and dataset[1] == "Battery Status": - continue - print request + dataset[0] + ".label", dataset[1] + if request == "volt": + if dataset[1] == "Battery Status": + continue + else: + print request + dataset[0] + ".label", dataset[1] + ref_val = float(dataset[1].split()[-1][:-1]) + print request + dataset[0] + ".warning", str(ref_val * 0.95) + ":" + str(ref_val * 1.05) + print request + dataset[0] + ".critical", str(ref_val * 0.80) + ":" + str(ref_val * 1.20) + if request == "temp": + print request + dataset[0] + ".label", dataset[1] + if dataset[1].startswith("CPU"): + print request + dataset[0] + ".warning", 55 + print request + dataset[0] + ".critical", 60 + if dataset[1].startswith("System"): + print request + dataset[0] + ".warning", 40 + print request + dataset[0] + ".critical", 45 + if request == "fan": + print request + dataset[0] + ".label", dataset[1] + print request + dataset[0] + ".warning", 2400 + print request + dataset[0] + ".critical", 2000 + sys.exit(0)