markabrahams / node-net-snmp

JavaScript implementation of the Simple Network Management Protocol (SNMP)
206 stars 97 forks source link

SNMT Agent table update #220

Closed santhosh77h closed 1 year ago

santhosh77h commented 1 year ago

it's not an issue but a question.

I was able to create SNMP agent and add table row as well...

My requirement is something like currently table is having 120 rows, each row is added every 5s, as and when it reached 120 need to remove the first row and add next row to the last row of table. how to achieve this?

Checked the documentation and code as well a bit but not able to find what is required solution.. so adding it as issue here...

@markabrahams can you please help on this?

markabrahams commented 1 year ago

Hi @santhosh77h - there are two calls you need from the library here - both documented - and it sounds like you've found one of them. To add a row to a table: mib.addTableRow (tableProviderName, row)

The other call you'll need is deleting a row from a table: mib.deleteTableRow (tableProviderName, rowIndex)

The logic of when to call these, what row details to add, which rows to delete, etc. will all be determined by the calling code in your application - the library doesn't have any control over or opinion about this.