Re: pass in /etc/snmp/snmpd.conf?

Mike Eggleston <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Got it finally. The program/script called by pass must return three values (I was returning two). The first is the OID (it the next OID if a next?), then the data type (unsigned is a gauge), then the value. 

Mike

> On May 7, 2020, at 13:42, Mike Eggleston <[email protected]> wrote:
> 
> 
> I was trying to be generic and remove the chaff. The actual file is:
> 
> -rw-r--r-- 1 meggle1 meggle1 11188 May  5 15:47 /usr/share/snmp/mibs/FIRST-CASH-MIB.txt
> 
> and there is nothing prior to the preamble and comments (—) and IMPORTS after the preamble. 
> 
> [meggle1@dvlnx108 monitor]$ head /usr/share/snmp/mibs/FIRST-CASH-MIB.txt
> FIRST-CASH-MIB DEFINITIONS ::= BEGIN
>  
> --
> -- First Cash MIB objects for agent module
> --
> -- snmptranslate -m FIRST-CASH-MIB -M /usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/irtf:/usr/share/mibs/site:/usr/share/mibs/tubs:. firstcashswap
>  
> IMPORTS
>     MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
>     Integer32, Unsigned32, Counter32, Gauge,
> [meggle1@dvlnx108 monitor]$ head -30 /usr/share/snmp/mibs/FIRST-CASH-MIB.txt
> FIRST-CASH-MIB DEFINITIONS ::= BEGIN
>  
> --
> -- First Cash MIB objects for agent module
> --
> -- snmptranslate -m FIRST-CASH-MIB -M /usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/irtf:/usr/share/mibs/site:/usr/share/mibs/tubs:. firstcashswap
>  
> IMPORTS
>     MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
>     Integer32, Unsigned32, Counter32, Gauge,
>     enterprises                               FROM SNMPv2-SMI
>     SnmpAdminString                           FROM SNMP-FRAMEWORK-MIB
>     RowStatus, StorageType                    FROM SNMPv2-TC
>     InetAddressType, InetAddress              FROM INET-ADDRESS-MIB
> ;
>  
> firstcash MODULE-IDENTITY
>     LAST-UPDATED "200406150000Z"
>     ORGANIZATION "www.firstcash.com"
> <...>
> END
> 
> Mike
> 
>>> On May 7, 2020, at 12:14, Paul Herring <[email protected]> wrote:
>>> 
>> 
>> > MIB::company
>> 
>> Are you sure that literal 'MIB' is right there? Seems awfully generic.
>> 
>> What do you have immediately preceding "DEFINITIONS ::= BEGIN" in your mib file?
>> 
>> 
>> 
>>> On Thu, May 7, 2020 at 5:47 PM Mike Eggleston <[email protected]> wrote:
>>> I’m trying to extend SNMP into the monitor I built. When I execute “/bin/sh /home/user/script.sh -g .1.3.6.1.4.1.34232.3” I get the right value. I have written a MIB into /usr/share/snmp/mibs and snmptranslate returns the right OID. I executed “snmpd -f -LS0-7d -Alf /tmp/snmp.log -Dexec” and see output in the log file. However, “snmpget -v2c —c public localhost MIB::company.3” says the value is not found. 
>>> 
>>> How do I diagnose this lack of returned bales?
>>> 
>>> TIA
>>> 
>>> Mike
>>> 
>>> _______________________________________________
>>> Net-snmp-users mailing list
>>> [email protected]
>>> Please see the following page to unsubscribe or change other options:
>>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>> 
>> 
>> -- 
>> PJH
>>

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.