[Bug 196739] sysutils/munin-node: Several plugins broken out of the box

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jan 14 23:39:33 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196739

            Bug ID: 196739
           Summary: sysutils/munin-node: Several plugins broken out of the
                    box
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: mat at FreeBSD.org
          Reporter: darius at dons.net.au
             Flags: maintainer-feedback?(mat at FreeBSD.org)
          Assignee: mat at FreeBSD.org

smart_ now wants smartpath to find smartctl (an alternative would be to modify
the plugin to look in the right place by default). Also, the sample config runs
it in group operator but this is not sufficient without modifying the
permissions for all disk devices and xpt0. I changed it to run it as root.

ipmi_sensor_ does not use an explicit path for ipmitool which causes problems
because (apparently) /usr/local/bin isn’t in the default munin path. Modifying
the plugin to use /usr/local/bin/ipmitool makes it work. It also seems to
invert the limits for fans which cause problems so I reverted that change.
--- /usr/local/share/munin/plugins/ipmi_sensor_.orig    2015-01-06
12:12:14.723448042 +1030
+++ /usr/local/share/munin/plugins/ipmi_sensor_    2015-01-06
13:16:58.003180510 +1030
@@ -124,7 +124,7 @@

def get_sensor_names():
    try:
-        p = Popen(["ipmitool","-I","open","sensor"], shell=False, stdout=PIPE)
+        p = Popen(["/usr/local/bin/ipmitool","-I","open","sensor"],
shell=False, stdout=PIPE)
    except OSError:
        return
    data = p.stdout.readlines()
@@ -152,12 +152,12 @@
    if curtime-mtime>CACHEAGE:
    if not SENSORS:
            try:
-                p = Popen(["ipmitool","-I","open","sensor"], shell=False,
stdout=PIPE)
+                p = Popen(["/usr/local/bin/ipmitool","-I","open","sensor"],
shell=False, stdout=PIPE)
            except OSError:
                return
    else:
            try:
-                p = Popen(["ipmitool","-I","open","sensor", "get", "--"] +
SENSORS, shell=False, stdout=PIPE)
+                p = Popen(["/usr/local/bin/ipmitool","-I","open","sensor",
"get"] + SENSORS, shell=False, stdout=PIPE)
            except OSError:
                return
        data = p.stdout.read()
@@ -254,12 +254,8 @@
            warn_u = values['Upper Non-Critical'].replace("na","")

    #TODO add 'fans'
-    if 'rpm'==unit:
-        warn = "%s:%s" % (warn_u,warn_l)
-        crit = "%s:%s" % (crit_u,crit_l)
-    else:
-        warn = "%s:%s" % (warn_l,warn_u)
-        crit = "%s:%s" % (crit_l,crit_u)
+    warn = "%s:%s" % (warn_l,warn_u)
+    crit = "%s:%s" % (crit_l,crit_u)

        if warn!=":":
            print "%s.warning %s" % (nname, warn)

The sample config file nut has a trailing “ for env.upsconf which causes it to
fail.

Also, sendmail_mailtraffic doesn’t work unless you have 'group wheel’ so it can
read /var/log/sendmail.st

--- Comment #1 from Bugzilla Automation <bugzilla at FreeBSD.org> ---
Auto-assigned to maintainer mat at FreeBSD.org

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list