OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Hardware and Performance »
  • monitor transceiver temps?
« previous next »
  • Print
Pages: [1]

Author Topic: monitor transceiver temps?  (Read 188 times)

OPNsense4ever

  • Newbie
  • *
  • Posts: 29
  • Karma: 2
    • View Profile
monitor transceiver temps?
« on: November 28, 2024, 05:58:50 am »
Is there a way to monitor transceiver temps with SNMP? It doesn't look like there is anything there without modifying the SNMP config files manually.

If there isn't I'll request it as a feature?
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6923
  • Karma: 583
    • View Profile
Re: monitor transceiver temps?
« Reply #1 on: November 28, 2024, 09:26:34 am »
What chipset are these interfaces? For example by appliance uses the axp (AMD 10G) driver.

With that knowledge you can check if the driver is able to read and deliver that information at all. Unfortunately in my case it doesn't. So what the kernel does not know you cannot report via SNMP and consequently a feature request does not make much sense, I guess.

I don't know if that is a hardware limitation of the chipset or a lacking implementation in FreeBSD.

To check what information is available for your interfaces (substitute the proper device):
Code: [Select]
sysctl dev.ax
No temperature data  :(
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

OPNsense4ever

  • Newbie
  • *
  • Posts: 29
  • Karma: 2
    • View Profile
Re: monitor transceiver temps?
« Reply #2 on: December 02, 2024, 12:47:34 am »
That info is definitely available via my Intel NICs.

# ifconfig -v ixl3 | awk '/module temperature/'
   module temperature: 52.00 C voltage: 3.25 Volts

I assume this information is getting to ifconfig via DDM? https://community.fs.com/article/how-to-view-the-ddm-information-of-optical-transceiver-via-snmp.html

Looks like it is just an SNMP configuration, but there isn't a way to make customized configs anymore.
« Last Edit: December 02, 2024, 12:59:01 am by OPNsense4ever »
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6923
  • Karma: 583
    • View Profile
Re: monitor transceiver temps?
« Reply #3 on: December 02, 2024, 12:59:08 am »
You are right - same for me:
Code: [Select]
root@opnsense:~ # ifconfig -v ax0
ax0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        [...]
module temperature: 50.95 C voltage: 3.30 Volts

It's not in the FreeBSD sysctl OID tree and neither does net-snmp expose these values in any way.

But the strength of net-snmp over bsnmpd is that it can easily be extended with simple shell scripts mapped to an OID.

So the question before I start hacking on this: do you know where exactly this value should end up in the SNMP MIB?
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

OPNsense4ever

  • Newbie
  • *
  • Posts: 29
  • Karma: 2
    • View Profile
Re: monitor transceiver temps?
« Reply #4 on: December 02, 2024, 06:08:35 pm »
Thanks Patrick!

Unfortunately I don't know where that MIB should end up. I looked around a bit and various switches put it in different places.

I stuck it in .1.3.6.1.4.1.2021.7890.5 as it was just the next one in /usr/local/share/snmp/snmpd.conf.

Code: [Select]
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/local/opnsense/scripts/OPNsense/Netsnmp/distro.sh
extend .1.3.6.1.4.1.2021.7890.2 hardware /bin/kenv smbios.planar.product
extend .1.3.6.1.4.1.2021.7890.3 vendor /bin/kenv smbios.planar.maker
extend .1.3.6.1.4.1.2021.7890.4 serial /bin/kenv smbios.planar.serial
extend .1.3.6.1.4.1.2021.7890.5 ixl3_temp /usr/local/bin/ixl3_temp.sh

/usr/local/bin/ixl3_temp.sh:

Code: [Select]
#!/bin/sh
# Extract the module temperature from ifconfig output
ifconfig -v ixl3 | awk '/module temperature/ {print $3}'

It "works," but obviously get overwritten quickly.
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6923
  • Karma: 583
    • View Profile
Re: monitor transceiver temps?
« Reply #5 on: December 02, 2024, 06:12:55 pm »
I'll go ask on the Observium discord. I'm interested in coding a generic solution. An option switch or a list of interfaces in the SNMP plugin menu.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Hardware and Performance »
  • monitor transceiver temps?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2