Commit 3e6f42a2 authored by Jan Koester's avatar Jan Koester
Browse files

zabbix support

parent 0383db48
Loading
Loading
Loading
Loading
+1 −1
Changes for src/collect.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ void diskRows(const std::vector<Record> &recs, const Settings &s, Table &t) {
        }
        if (number(rec.get("temperature"), n) && n >= s.tempWarning) {
            r.status = worse(r.status, n >= s.tempCritical ? Status::Critical : Status::Warning);
            addNote(r, std::to_string(n) + " °C");
            addNote(r, "temperature " + std::to_string(n) + " C");  // ASCII: NMS show the rest as hex
        }
        if (rec.has("problem")) {
            r.status = worse(r.status, Status::Warning);
+14.8 KiB

File added.

No diff preview for this file type.

+2 −0
Changes for tools/mkmib.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/usr/bin/env python3
# Writes mibs/SNMPDD-MIB.txt. The column numbers are those of
# src/collect.cpp (a column is its position in the list + 2): change both.
# tools/mkzabbix.py builds the Zabbix template from the same tables.
#
#   python3 tools/mkmib.py

@@ -274,6 +275,7 @@ snmpddCompliance MODULE-COMPLIANCE
END
''')

if __name__ == '__main__':
    root = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')
    with open(os.path.join(root, 'mibs', 'SNMPDD-MIB.txt'), 'w') as f:
        f.write(''.join(out))

tools/mkzabbix.py

0 → 100644
+452 −0

File added.

Preview size limit exceeded, changes collapsed.

+5378 −0

File added.

Preview size limit exceeded, changes collapsed.