Re: [snmpsim-users] snmpsim 0.2.4rc1 with mysql
Brought to you by:
elie
|
From: Bhagat, Y. (Yateen) <yat...@al...> - 2013-08-27 11:49:51
|
Hi Ilya
I my mysql table, “oid” has not been defined as primary key, could that be a problem?
-Yateen
From: Bhagat, Yateen (Yateen)
Sent: Tuesday, August 27, 2013 12:27 PM
To: 'Ilya Etingof'
Cc: snm...@li...
Subject: RE: snmpsim 0.2.4rc1 with mysql
Hi Ilya,
1. I tried mysql commit, even then there is no success.
2. Format of the OID is correct (with padding spaces)
3. I tried querying the snmpsim with standard snmpget command, even this does not show updated OID value, old initial value is shown.
4. After updating the OID value (by changing the referred mysql table row) if I restart the snmpsim, then the updated value of the OID is visible.
My suspect is somewhere snmpsim is caching the mysql referred values, and the cache is not updated.
Please help !
Regards
Yateen
From: Ilya Etingof [mailto:il...@gl...]
Sent: Monday, August 26, 2013 7:27 PM
To: Bhagat, Yateen (Yateen)
Cc: snm...@li...<mailto:snm...@li...>
Subject: Re: snmpsim 0.2.4rc1 with mysql
Hi Yateen,
Neither snmpsim nor SQL module does any caching of the values read from the database. So I suggest checking the following:
1. You do SQL commit upon value change (if applicable)
2. You read the same OID you modify. Note the format of the OID used by snmpsim includes padding spaces.
3. Your snmp manager does not do any caching by its own means.
Let me know in case of further problems.
-ilya
On Aug 26, 2013, at 12:49, "Bhagat, Yateen (Yateen)" <yat...@al...<mailto:yat...@al...>> wrote:
Hi Ilya,
I have found an issue with 0.2.4rc1 (with mysql DB )
My snmprec file has two oid’s referring to two rows in one single mysql table as given below:
- - - - - - -
- - - - - - -
1.3.6.1.4.1.637.74.1.2.2.1.1.2.2.2.0|66|10
1.3.6.1.4.1.637.74.1.2.2.1.1.2.2.3.0|2|1
1.3.6.1.4.1.637.74.1.2.2.1.1.2.2.4.0|:sql|maxNotifSeqTable_87fa2144
1.3.6.1.4.1.637.74.1.2.2.1.1.2.2.5.0|:sql|maxNotifSeqTable_87fa2144
1.3.6.1.4.1.637.74.1.2.2.1.1.2.2.6.0|66|2944
1.3.6.1.4.1.637.74.1.2.2.1.1.2.2.7.0|66|8017
- - - - -
- - - - - -
The values for these two OIDs are being continuously changed every 1 sec ; by some script that modifies the “value” column in the in the mysql table.
We have observed that when our snmp Manager queries these OID using “snmpget”, snmpsim always returns only the initial OID values that were present in the DB table at the startup of snmpsim. However, I could see the OID values getting changed in the backend DB, when queried using sql command.
Please help
From: Bhagat, Yateen (Yateen)
Sent: Thursday, August 22, 2013 3:22 PM
To: 'Ilya Etingof'
Cc: Bhagat, Yateen (Yateen)
Subject: RE: snmpsim with mysql
Hi Ilya
This issue is resolved, I realized later that another snmp daemon was already running on port 161.
I have another issue, but before I report that just need quick info.
I assume that in even in version 0.2.4rc1 (with mysql ) snmprec file can be hybrid, meaning some OIDs being static and other being referred from mysql tables.
Thanks
Yateen
From: Bhagat, Yateen (Yateen)
Sent: Tuesday, August 20, 2013 5:05 PM
To: 'Ilya Etingof'
Subject: snmpsim with mysql
Hi Ilya
I am trying to use snmpsim-0.2.4rc1 with mysql variation module,
Getting following error:
D:\snmpsim-0.2.4rc1\scripts>snmpsimd.py --variation-module-options=sql:dbtype:my
sql.connector,host:127.0.0.1,port:3306,user:snmpsim,password:snmpsim,database:sn
mpsim --agent-udpv4-endpoint=135.250.33.68 --v2c-arch
ERROR: bind() failed: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
Please help !
Thanks
Yateen ,
|