Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549026 - net-analyzer/munin: smart plugin: Unable to parse the link and smartoutput
Summary: net-analyzer/munin: smart plugin: Unable to parse the link and smartoutput
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sysadmin Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-09 16:17 UTC by georg
Modified: 2016-08-19 18:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info munin (file_549026.txt,5.39 KB, text/plain)
2015-05-09 16:18 UTC, georg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description georg 2015-05-09 16:17:11 UTC
I want munin to monitor the smart values of my server drives. 

ls -la /etc/munin/plugins/smart_sda 
lrwxrwxrwx 1 root root 33  9. Mai 00:48 /etc/munin/plugins/smart_sda -> /usr/libexec/munin/plugins/smart_

Smart finds my sda drive
smartctl -H /dev/sda
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.15.10-hardened-r1-server] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

The script /usr/libexec/munin/plugins/smart_ fails to parse the linkname in line 236. They always access name[0]. after the line
name=[plugin_name[string.index(plugin_name,'_')+1:]]

name is empty. name[0] is empty too.

In the function get_hard_drive_name() i replaced all  name[0] with name and it succedded. I manually set name to sda. I am not so familar with python to debug the whole script ... 

I tried to switch to python 2.7 and 3.3. 2,.7 did work better than 3.3 but not perfect (no values).



Reproducible: Always

Steps to Reproduce:
1. emerge munin
2. set verbose level to True (line 91)
3. ln -s /usr/libexec/munin/plugins/smart_ /etc/munin/plugins/smart_sda
4. cd /etc/munin/plugins/
5. ./smart_sda
Actual Results:  
Can not find smart values.

Expected Results:  
output of smart values.
Comment 1 georg 2015-05-09 16:18:35 UTC
Created attachment 402906 [details]
emerge info munin
Comment 2 georg 2015-05-09 16:28:26 UTC
In the function def read_values(hard_drive) when i output the device to the log it is just "/dev/s" and not /dev/sda. Manually setting it to /dev/sda brings it a litte further but not to the end ....
Comment 3 Jonas Stein gentoo-dev 2016-08-19 18:10:03 UTC
is it this bug from upstream?
https://github.com/munin-monitoring/munin/issues/602