Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Jun 2024 11:50:31 -0400
From:      "Dan Langille" <dan@langille.org>
To:        "Mark Johnston" <markj@freebsd.org>
Cc:        "Budi Janto" <budijanto@studiokaraoke.co.id>, pkg@freebsd.org
Subject:   Re: NULL result with net-snmp-5.9.4_1,1
Message-ID:  <a9d904d5-9955-4ee7-af7a-d195819a6e72@app.fastmail.com>
In-Reply-To: <ZltCFitoO9znmsPg@framework>
References:  <908894bb-9be8-455b-8fee-e7164d2451e9@studiokaraoke.co.id> <f4d2e9e6-8c71-4a18-bab4-595adc2a834e@app.fastmail.com> <ZltCFitoO9znmsPg@framework>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 1, 2024, at 11:45 AM, Mark Johnston wrote:
> On Sat, Jun 01, 2024 at 11:35:02AM -0400, Dan Langille wrote:
>> On Sun, May 26, 2024, at 2:00 AM, Budi Janto wrote:
>> > Hi,
>> >
>> > I need some help with Net-SNMP packages for monitoring CPU temperature.
>> >
>> > # uname -smr
>> > FreeBSD 14.0-RELEASE-p5 amd64
>> >
>> > # pkg info | grep net-snmp
>> > net-snmp-5.9.4_1,1             Extendable SNMP implementation
>> >
>> > # sh x/snmp-cpu-temperature.sh
>> > 30.0
>> > 29.0
>> > 28.0
>> > 28.0
>> > 29.0
>> > 29.0
>> > 29.0
>> > 29.0
>> > 30.0
>> > 28.0
>> > 28.0
>> > 27.0
>> >
>> > # snmpwalk -v2c -c public localhost . | grep 
>> > 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature"'
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".1 = STRING:
>> >
>> > That's NULL result.
>> >
>> > But, I changed to net-snmp-5.9.4,1 version.
>> > # pkg info | grep net-snmp
>> > net-snmp-5.9.4,1               Extendable SNMP implementation
>
> I believe that in net-snmp-5.9.4_1,1, snmpd is running as the "snmpd"
> user rather than as root.  Can you confirm this?  net-snmp-5.9.4_2,1
> reverts back to running as root.  Does that fix the problem for you?
>
> What is in your snmp-cpu-temperature.sh script?  Does it need to run as
> root?  (I'd be a bit surprised if so.)

Budi: My snmpd is running as the snmpd user.

>> > # snmpwalk -v2c -c public localhost . | grep 
>> > 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature"'
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".1 = STRING: 35.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".2 = STRING: 35.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".3 = STRING: 38.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".4 = STRING: 38.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".5 = STRING: 38.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".6 = STRING: 38.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".7 = STRING: 36.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".8 = STRING: 36.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".9 = STRING: 39.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".10 = STRING: 39.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".11 = STRING: 35.0
>> > NET-SNMP-EXTEND-MIB::nsExtendOutLine."cpu-temperature".12 = STRING: 36.0
>> 
>> with net-snmp-5.9.4_2,1 for what it's worth:
>> 
>> [dvl@besser:~] $ snmpwalk -v3 -l authPriv -u roMinion -a SHA -A $AUTHPASS -X $PRIVPASS -x AES dev-nginx01.int.unixathome.org | grep temperature
>> [dvl@besser:~] $ 
>
> This is in the extension MIB, so presumably Budi has some configuration
> to add these OIDs.  Did you add something like that?

I thought about that after sending... no I don't, but I'm willing to try if Budi forwards the script / configuration.

-- 
  Dan Langille
  dan@langille.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a9d904d5-9955-4ee7-af7a-d195819a6e72>