Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart Extend can't read more than 3 disks #16061

Closed
gitterdoneplease opened this issue May 23, 2024 · 3 comments
Closed

Smart Extend can't read more than 3 disks #16061

gitterdoneplease opened this issue May 23, 2024 · 3 comments

Comments

@gitterdoneplease
Copy link

The problem

I finally got smart working and then it stopped. The results include the long extended testing now after I created crontab entries per the instructions:

*/5 * * * * /etc/snmp/smart -u
0 0 * * * /etc/snmp/smart -t long

My config file is:

smartctl=/sbin/smartctl
cache=/var/cache/smart
aacraid0,0 /dev/sda -d aacraid,0,0,0
aacraid0,1 /dev/sda -d aacraid,0,0,1
aacraid0,2 /dev/sda -d aacraid,0,0,2
#aacraid0,3 /dev/sda -d aacraid,0,0,3
#aacraid0,4 /dev/sda -d aacraid,0,0,4
#aacraid0,5 /dev/sda -d aacraid,0,0,5
#aacraid0,6 /dev/sda -d aacraid,0,0,6
#aacraid0,7 /dev/sda -d aacraid,0,0,7
#aacraid0,8 /dev/sda -d aacraid,0,0,8
#aacraid0,9 /dev/sda -d aacraid,0,0,9

If I comment out any more than those three drives in the discovery debug I get:

Applications: 
SNMP['/usr/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUs' '-m' 'NET-SNMP-EXTEND-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' 'nsExtendStatus']

Exitcode: 1  

Timeout: No Response from udp:myIP:161  

Timeout: No Response from udp:myIP:161  

and:

SQL[insert into eventlog (reference, type, datetime, severity, message, username, device_id) values (?, ?, ?, ?, ?, ?, ?) [null,"application","2024-05-22 22:09:25",3,"Application disabled by discovery: smart","",29] 2.38ms]

I've tried using v3 TCP/UDP and v2c as well with no luck.

Output of ./validate.php

librenms@librenms:~$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 24.5.0-11-gc7708922a (2024-05-22T20:03:51-07:00)
DB Schema | 2024_04_29_183605_custom_maps_drop_background_suffix_and_background_version (294)
PHP       | 8.1.2-1ubuntu2.14
Python    | 3.10.12
Database  | MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
===========================================

[OK]    Composer Version: 2.7.4
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    Database and column collations are correct
[OK]    Database schema correct
[OK]    MySQL and PHP time match
[OK]    Active pollers found
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[OK]    Python poller wrapper is polling
[OK]    Redis is unavailable
[OK]    rrd_dir is writable
[OK]    rrdtool version ok

What was the last working version of LibreNMS?

No response

Anything in the logs that might be useful for us?

No issues in the logs that I see.
@VVelox
Copy link
Contributor

VVelox commented Jun 4, 2024

@gitterdoneplease What does relevant bit of your SNMPD config look like?

Also likely want to call from cron with -Z as with out that, that can break snmpd.

@VVelox
Copy link
Contributor

VVelox commented Jun 4, 2024

Created a PR for updating the docs on this a bit. #16086

Likely what you want to do after enabling the -Z flag for the cron job is set update cache printing to be /bin/cat /var/cache/smart in your snmpd config.

@gitterdoneplease
Copy link
Author

gitterdoneplease commented Jun 4, 2024

Well that's a lot different than what I had before. 😁

My crontab is now:

*/5 * * * * /etc/snmp/smart -uZ
0 0 * * * /etc/snmp/smart -Zt long

And my snmpd.conf file looks like:

extend smart /bin/cat /var/cache/smart

This will mean adjusting SELinux if you have it.

All working now. Great to see some updated documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants