Re: How could I leave a message?

2022-07-24 Thread Paul Herring
You've already spammed three to the list.

Perhaps ask your question instead of sending test messages?

On Mon, 25 Jul 2022, 07:37 김동휘,  wrote:

>
>
>
>
> =
>
>
>
>
> ___
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How could I leave a message?

2022-07-24 Thread 김동휘
Dear All,

I don’t know how to leave a question at this site.
So I check whether this mail is right for asking a question.

Sorry
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Q&A Test

2022-07-24 Thread 김동휘
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How to compile table nodes for tables that don't have a rowStatus entry?

2022-06-11 Thread Mostafa Kassem
Greetings,

I have a MIB file with several tables, some of them have rowStatus entries, 
some of them don't have rowStatus entries.

I used mb2c on all the tables with mib2c.iterate.conf configuration file since 
the data is external to the agent. I have no problem with the tables that have 
the rowStatus entry, they are working fine. When trying to set a table row in 
tables with no rowStatus, I get an error stating: oid failed during SNMP set 
operation (no creation).

My question is, is mib2c.iterate.conf configuration file is the proper 
configuration to generate the C files for tables without rowStatus entry?

If not, which configuration file is suitable to use with tables with no 
rowStatus?

Thanks,

Mostafa


___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Guides which I follow to setup PRTG Network Monitor to monitor the bandwidth usage of Sophos XG210 firewall for a company in Singapore

2022-02-16 Thread Turritopsis Dohrnii Teo En Ming
Subject: Guides which I follow to setup PRTG Network Monitor to
monitor the bandwidth usage of Sophos XG210 firewall for a company in
Singapore

Good day from Singapore,

This is the list of guides which I follow to setup PRTG Network
Monitor to monitor the bandwidth usage of Sophos XG210 firewall for a
company in Singapore. I have to turn on/enable and configure SNMP
settings in the Sophos XG210 firewall.

The following list is in chronological order.

Guides on how to setup PRTG Network Monitor to monitor bandwidth usage
of Sophos XG210 firewall

A Collection of Guides
==

Implemented by: Mr. Turritopsis Dohrnii Teo En Ming (TARGETED INDIVIDUAL)
Country: Singapore
Date: 16 Feb 2022 Wednesday

[0] How To: Free network monitoring with PRTG
Link: https://www.paessler.com/howto-free-network-monitoring

[1] How can I monitor Sophos UTM devices with PRTG?
Link: 
https://kb.paessler.com/en/topic/73179-how-can-i-monitor-sophos-utm-devices-with-prtg

[2] Sophos Firewall: How to configure SNMP
Link: https://support.sophos.com/support/s/article/KB-36491?language=en_US

[3] Install or configure SNMP for Windows
Link: 
https://support.solarwinds.com/SuccessCenter/s/article/Install-or-configure-SNMP-for-Windows?language=en_US

[4] SNMP Tester
Link: 
https://www.paessler.com/tools/snmptester?_ga=2.206899479.520537828.1644983036-1674203559.1644983036

[5] Can't find a sensor for my device in PRTG but I believe it
supports SNMP. How to proceed?
Link: 
https://kb.paessler.com/en/topic/65638-can-t-find-a-sensor-for-my-device-in-prtg-but-i-believe-it-supports-snmp-how-to-proceed

[6] How can I import my MIB files into PRTG?
Link: 
https://kb.paessler.com/en/topic/733-how-can-i-import-my-mib-files-into-prtg

[7] MIB Importer
Link: 
https://www.paessler.com/tools/mibimporter?_ga=2.16965949.520537828.1644983036-1674203559.1644983036

[8] PRTG Manual: SNMP Library Sensor
Link: 
https://www.paessler.com/manuals/prtg/snmp_library_sensor?_ga=2.37834023.520537828.1644983036-1674203559.1644983036

[9] PRTG Tutorial: SNMP Custom Sensors and SNMP Library Sensors
Link: https://www.youtube.com/watch?v=DRyZf6c0iLE

I hope the above information is useful to you.

Regards,

Mr. Turritopsis Dohrnii Teo En Ming
Targeted Individual in Singapore
16 Feb 2022 Wednesday Singapore Time


___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Retrieving OID from a request with a handler

2021-09-16 Thread Hyundeok Park
Sorry, I just figured out that I was doing it wrong.

`requests->requestvb->name` works properly.

Thank you.

On Thu, 16 Sept 2021 at 11:16, Hyundeok Park  wrote:

> Is it possible to retrieve an OID from a request in Net-SNMP?
>
> This is to allow the module to identify arguments passed to an OID.
>
> For example, the following OID
>
> ```
> .1.2.3.4.\"qwerty\"
> ```
>
> is translated into
>
> ```
> .1.2.3.4.113.119.101.114.116.121
>  ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
>   q   w   e   r   t   y
> ```
>
> The current implementation lets the `Netsnmp_Node_Handler` process
> requests to each registered OID.
>
> This handler takes four parameters:
>
> ```c
> handle_[NAME OF OBJECT](netsnmp_mib_handler *handler AEGIS_UNUSED,
> netsnmp_handler_registration *reginfo AEGIS_UNUSED,
> netsnmp_agent_request_info *reqinfo,
> netsnmp_request_info *requests);
> ```
>
> And I couldn't find a way to retrieve an OID from each request.
>
> I tried using `reginfo->rootoid` and `requests->requestvb->name`. However,
> they only returned `.1.3.6.1.4` when I registered the handler to a
> different OID (`.1.3.6.1.4.1.9.1.1`).
>
> I found that a function type `FindVarMethod` was used to handle requests
> in UCD-SNMP:
>
> ```c
> unsigned char *var_[NAME OF OBJECT](struct variable *vp, oid *name,
> size_t *length, int exact, size_t
> *var_len,
> WriteMethod **write_method);
>
> ```
>
> Is `oid *name` what I'm looking for?
>
> If so, is it possible to do so in Net-SNMP?
>
> Thank you.
>
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Retrieving OID from a request with a handler

2021-09-16 Thread Hyundeok Park
Is it possible to retrieve an OID from a request in Net-SNMP?

This is to allow the module to identify arguments passed to an OID.

For example, the following OID

```
.1.2.3.4.\"qwerty\"
```

is translated into

```
.1.2.3.4.113.119.101.114.116.121
 ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
  q   w   e   r   t   y
```

The current implementation lets the `Netsnmp_Node_Handler` process requests
to each registered OID.

This handler takes four parameters:

```c
handle_[NAME OF OBJECT](netsnmp_mib_handler *handler AEGIS_UNUSED,
netsnmp_handler_registration *reginfo AEGIS_UNUSED,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests);
```

And I couldn't find a way to retrieve an OID from each request.

I tried using `reginfo->rootoid` and `requests->requestvb->name`. However,
they only returned `.1.3.6.1.4` when I registered the handler to a
different OID (`.1.3.6.1.4.1.99999.1.1`).

I found that a function type `FindVarMethod` was used to handle requests in
UCD-SNMP:

```c
unsigned char *var_[NAME OF OBJECT](struct variable *vp, oid *name,
size_t *length, int exact, size_t
*var_len,
WriteMethod **write_method);

```

Is `oid *name` what I'm looking for?

If so, is it possible to do so in Net-SNMP?

Thank you.
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


What is the best code estrategy to reptitively query a mib variable?

2020-10-27 Thread Jose Roberto Fernandez Anahia
Hello net-snmp users and fellows,

I would like to get an opnion about a doubt.
Im coding in C/C++ and using single session API … well doesn’t matter to the 
core of my question…. just to inform.

I need each 30 seconds (as quickly the agent can do) to get a three distinct 
MIB scalar variable value,
always the same variables, doing this inside loop.

Considering the well know and usual sequence code to do this:

  sessionSingle = (void*) snmp_sess_open(session);
… error check …
  puSession_p = snmp_sess_session((session_list *) sessionSingle); 
… error check …

 puPDU = snmp_pdu_create(SNMP_MSG_GET);
While() {
pdu = snmp_pdu_create(SNMP_MSG_GET);
snmp_add_null_var(pdu, theoid_1, theoid_1_len);
snmp_add_null_var(pdu, theoid_2, theoid_2_len);
snmp_add_null_var(pdu, theoid_3, theoid_3_len);
...
status = snmp_synch_response(ss, pdu, &response);
… Now read each variable in response
…
 snmp_free_pdu(response);
}

We know that created pdu cannot be reused, otherwise it can be outside the loop.
also the response is not reusable to since snmp_synch_response  alloc a new one 
each time.

Taking these initial considerations,
trying to optimize the snmp_functions inside the loop I wrote:


puPDU = snmp_pdu_create(SNMP_MSG_GET);
While() {
netsnmp_pdu * cloned_pdu = snmp_clone_pdu(pdu);

snmp_add_null_var(cloned_pdu, theoid_1, theoid_1_len);
snmp_add_null_var(cloned_pdu, theoid_2, theoid_2_len);
snmp_add_null_var(cloned_pdu, theoid_3, theoid_3_len);
...
status = snmp_synch_response(session, cloned_pdu, &response);
   … Now read each variable in response
…
 snmp_free_pdu(response);
}

Finally my two doubts as questions for who that had the same problem or wish
to propose/discuss some alternatives:

1- I’m really optimizing something avoiding successive snmp_pdu_create() calls 
inside with snmp_clone_pdu()?
2- What others/more changes optimizing same calls inside the loop can I do?

Any help or suggestions will be useful and surely appreciated!

Best regards for all!

JRFA




___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Running net-snmp in a docker container ?

2020-08-26 Thread Wes Hardaker via Net-snmp-users
"Waines, Greg"  writes:

>   * MasterAgent and SubAgent communicate over TCP/IP between containers or
> between container and host

So the one issue there is that AgentX over TCP is potentially insecure.
Between containers, in an isolated environment, it's fine.  Between the
container and the host you are leaking a TCP port that may be used
maliciously.  AgentX was designed to run over a secured socket, so the
right thing to do is attach a secured socket instead through the
container file passing mechanism; I assume this is possible but haven't
tried it.

-- 
Wes Hardaker
USC/ISI


___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Running net-snmp in a docker container ?

2020-08-18 Thread Waines, Greg
Is it possible to run net-snmp in a docker container and extend net-snmp mibs 
(e.g. add an enterprise mib) from an application process running either on the 
host or in another container ?

Has anyone tried this ?

We are thinking of using the MasterAgent/SubAgent net-snmp architecture for this
i.e.

  *   where MasterAgent would own the root of the OID tree and own all the 
general snmp configuration (e.g. protocol, user/community configuration, trap 
destination configuration, etc. )
  *   Then one or more SubAgents can register with the MasterAgent, to take 
ownership of a lower portion of the OID tree (e.g. a company’s enterprise tree).
  *   MasterAgent and SubAgent communicate over TCP/IP between containers or 
between container and host
  *   SubAgent can use local techniques for binding requesthandlers for OID 
groups or tables

Is this thinking correct ?

If this thinking is correct, are the following message flows correct ?

  *   For an SNMP GET
 *   External snmp manager --> MasterAgent --> SubAgent --> MasterAgent --> 
External snmp manager
  *   For an SNMP Trap
 *   SubAgent --> MasterAgent --> External snmp manager

Let me know,
Greg.
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: How to properly end a bulk request

2020-08-04 Thread He Da-Luo
Thanks Vincent,
That clears things out.
I was expecting, I was doing something wrong.


On Tue, Aug 4, 2020 at 7:29 AM Vincent Bernat  wrote:

>  ❦ 31 juillet 2020 17:51 +02, He Da-Luo:
>
> > I'm developing an agent using the library Net-SNMP agent. Most of it
> works
> > fine but the requests from "snmptable" (bulk requests).
> > When the Net-SNMP agent gets a "get next request"(snmpwalk) that reaches
> > the end of a column or my table, my handler returns "null". Net-SNMP
> agent
> > responds with a next oid which belongs to another part of the tree and
> > snmpwalk stops its requests.
> > But when the Net-SNMP agent gets a "bulk request"(snmptable), it does not
> > stop at the end of my table. It keeps going down the tree, calling my
> other
> > handlers for other tables.
> > So my question is : How is it supposed to end ? I read about 'End of MIB
> > exception' but I don't really know how to raise that and I don't really
> > reach the end of the MIB just the end of that table.
>
> A GETBULK call is not expected to end at the boundary of a table. There
> is no way for the agent to know if the caller is snmptable or snmpwalk.
> The manager is expected to throw away the part it doesn't use.
> --
> Identify bad input; recover if possible.
> - The Elements of Programming Style (Kernighan & Plauger)
>
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: How to properly end a bulk request

2020-08-03 Thread Vincent Bernat
 ❦ 31 juillet 2020 17:51 +02, He Da-Luo:

> I'm developing an agent using the library Net-SNMP agent. Most of it works
> fine but the requests from "snmptable" (bulk requests).
> When the Net-SNMP agent gets a "get next request"(snmpwalk) that reaches
> the end of a column or my table, my handler returns "null". Net-SNMP agent
> responds with a next oid which belongs to another part of the tree and
> snmpwalk stops its requests.
> But when the Net-SNMP agent gets a "bulk request"(snmptable), it does not
> stop at the end of my table. It keeps going down the tree, calling my other
> handlers for other tables.
> So my question is : How is it supposed to end ? I read about 'End of MIB
> exception' but I don't really know how to raise that and I don't really
> reach the end of the MIB just the end of that table.

A GETBULK call is not expected to end at the boundary of a table. There
is no way for the agent to know if the caller is snmptable or snmpwalk.
The manager is expected to throw away the part it doesn't use.
-- 
Identify bad input; recover if possible.
- The Elements of Programming Style (Kernighan & Plauger)


___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How to properly end a bulk request

2020-07-31 Thread He Da-Luo
Hello,
I'm developing an agent using the library Net-SNMP agent. Most of it works
fine but the requests from "snmptable" (bulk requests).
When the Net-SNMP agent gets a "get next request"(snmpwalk) that reaches
the end of a column or my table, my handler returns "null". Net-SNMP agent
responds with a next oid which belongs to another part of the tree and
snmpwalk stops its requests.
But when the Net-SNMP agent gets a "bulk request"(snmptable), it does not
stop at the end of my table. It keeps going down the tree, calling my other
handlers for other tables.
So my question is : How is it supposed to end ? I read about 'End of MIB
exception' but I don't really know how to raise that and I don't really
reach the end of the MIB just the end of that table.

I hope I'm being clear, I'll send you more infos if not.
Best regards,
He Da-Luo
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Is there a list of snmpd -DTOKEN allowed values somewhere?

2020-07-07 Thread François Isabelle
Hi I'm trying to narrow down a problem with SNMPD while -Dall gives too
much information to my taste, I was hoping to find a list of recognized
tokens.
Does such a list exist?

Thank you
Frank
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmpv3 user restricted to a subnet

2020-03-22 Thread Nitin Samuel
HI All,
   Just like we have com2sec restricting a community string to a
subnet, do we have a means to restrict a v3 user to a subnet as well ?

Thanks,
Nitin
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


a few questions from a beginner

2020-03-16 Thread Michael Zimmers
Hi -

I hope this is an appropriate forum for my questions; if not, apologies.

I've recently been tasked with modifying an embedded application to send an 
SNMP trap upon the occurrence of a particular event (a button push). I've read 
multiple online tutorials, and they've helped me get a good conceptual and 
functional understanding of SNMP. What I am absolutely unable to find is any 
specifics on the (byte-by-byte) format of the messages used.

Resources are limited on my target platform, so it's unclear how much of the 
net-snmp code I can use. So, my questions are:


  1.  As a first step, I was hoping to hard-code an SNMP trap message, send it, 
and examine the Wireshark analysis. Unfortunately, I can't even do this, 
because I don't understand the internals of the message well enough to stub one 
out. Does anyone know of a resource that would help me with this?
  2.  An example question about the message internals: I understand that 
SNMPv2(c) messages consist of:
 *   Version
 *   Community
 *   PDU
The version I understand - it's a 4-byte integer (though I need to get the 
byte-order correct). But the community field is described as an octet string. I 
read elsewhere that it's not null terminated, so how does the receiver know 
where this field ends, and the PDU field begins? (similar question about the 
variable bindings)

  1.  (more opinion based) does net-snmp seem like overkill for this 
application? After all, I only need to send one message, and I don't need to 
respond to anything.

Thanks very much for any guidance. I realize this might not have been the ideal 
place to ask, but I am truly confounded by the dearth of information I can find 
on the internals of the messages.

mz

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: running a script with a dynamic parameter

2019-11-29 Thread drovalev

Hello.

All the same, can I pass the parameter to the script through the SNMP? 
This script is located on a managed system (snmp agent).


*Yes or no?*

If yes, then how?
It is not realistic to write all scripts with all parameters to the 
snmpd.conf file!


Thank. Roman.

27.11.2019 9:04, Дровалев Роман пишет:


Hello.

26.11.2019 22:44, Larry Hayes пишет:

Have you tried this in your snmpd.conf file:

exec [MIBOID] NAME PROG ARGS

OR

sh [MIBOID] NAME PROG ARGS

       exec and sh extensions can only be configured via the 
snmpd.conf file.  They cannot be set up via SNMP SET requests.


If you look in the snmpd.conf man pages, you will find more details, 
under the EXTENDING AGENT FUNCTIONALITY section.




Thanks for the answer. So, through creating your own MIB, this is not 
possible! Ok, Got it.


I read the documentation. I ask a bad question.
My task:
Transfer dynamically "parameter" to agent through Net-SNMP, a script 
with this "parameter" should be executed on the agent. Is it possible?


For example, a script has  500,000 parameters. Should I create 500,000 
lines in the snmpd.conf file? With one script-parameter per line?


Is there a Net-SNMP setting that allows you to pass an arbitrary 
parameter to a script that is not specified in advance?


Thanks. Roman.



On Tue, Nov 26, 2019 at 12:50 AM Дровалев Роман 
mailto:drova...@alfasatcom.ru>> wrote:


Hello.
Thanks for the quick response. I understand the script.

How to implement this through the Net-SNMP?
1. I am editing a file /etc/snmp/snmpd.conf

/*pass .1.3.6.1.4.1.2021.8.4 test2 /usr/share/snmp/test2.sh*/

# cat test2.sh/*
#!/bin/sh
/bin/cat $1 >> /tmp/test2.new
*/


# /*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l
authPriv -u snmpadmin 10.0.2.251 .1.3.6.1.4.1.2021.8.4 s 12*/
UCD-SNMP-MIB::extTable.4 = STRING: "12"

File /*test2.new*/ is not created! That is does not work.

2. Is it possible to create own MIB with the implementation of
this functionality? How to make it work?

Or is it possible to launch a script by accessing the OID only by
editing file snmpd.conf?

Thanks. Roman.


26.11.2019 3:11, Linux пишет:


Is this what you are looking for? This would the content of your
script "program".

    #!/bin/sh

param=$1

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l
authPriv -u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s $param*/

- Ajay/**/Sharma

/*
*/

On 11/25/19 4:35 AM, Дровалев Роман wrote:


Hello.

Tell me please. Is it possible with Net-SNMP to do the following?

I send the command to the agent:

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l
authPriv -u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s "parameter #1"
*/


for this OID, the script "program" is executed on the agent
with the "parameter #1" input for this script.

Is it possible to implement this?
What is the most suitable way for this?

/"parameter #1" - this can be, for example, curl request./

Thanks. Roman.



___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net  
<mailto:Net-snmp-users@lists.sourceforge.net>
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users



___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net  
<mailto:Net-snmp-users@lists.sourceforge.net>
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


-- 
С уважением, Дровалев Роман

Сетевой инженер ООО "Альфасатком"

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
<mailto:Net-snmp-users@lists.sourceforge.net>
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


--
С уважением, Дровалев Роман
Сетевой инженер ООО "Альфасатком"


___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


--
С уважением, Дровалев Роман
Сетевой инженер ООО "Альфасатком"

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: running a script with a dynamic parameter

2019-11-26 Thread Дровалев Роман

Hello.

26.11.2019 22:44, Larry Hayes пишет:

Have you tried this in your snmpd.conf file:

exec [MIBOID] NAME PROG ARGS

OR

sh [MIBOID] NAME PROG ARGS

       exec and sh extensions can only be configured via the 
snmpd.conf file.  They cannot be set up via SNMP SET requests.


If you look in the snmpd.conf man pages, you will find more details, 
under the EXTENDING AGENT FUNCTIONALITY section.




Thanks for the answer. So, through creating your own MIB, this is not 
possible! Ok, Got it.


I read the documentation. I ask a bad question.
My task:
Transfer dynamically "parameter" to agent through Net-SNMP, a script 
with this "parameter" should be executed on the agent. Is it possible?


For example, a script has  500,000 parameters. Should I create 500,000 
lines in the snmpd.conf file? With one script-parameter per line?


Is there a Net-SNMP setting that allows you to pass an arbitrary 
parameter to a script that is not specified in advance?


Thanks. Roman.



On Tue, Nov 26, 2019 at 12:50 AM Дровалев Роман 
mailto:drova...@alfasatcom.ru>> wrote:


Hello.
Thanks for the quick response. I understand the script.

How to implement this through the Net-SNMP?
1. I am editing a file /etc/snmp/snmpd.conf

/*pass .1.3.6.1.4.1.2021.8.4 test2 /usr/share/snmp/test2.sh*/

# cat test2.sh/*
#!/bin/sh
/bin/cat $1 >> /tmp/test2.new
*/


# /*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l
authPriv -u snmpadmin 10.0.2.251 .1.3.6.1.4.1.2021.8.4 s 12*/
UCD-SNMP-MIB::extTable.4 = STRING: "12"

File /*test2.new*/ is not created! That is does not work.

2. Is it possible to create own MIB with the implementation of
this functionality? How to make it work?

Or is it possible to launch a script by accessing the OID only by
editing file snmpd.conf?

Thanks. Roman.


26.11.2019 3:11, Linux пишет:


Is this what you are looking for? This would the content of your
script "program".

    #!/bin/sh

param=$1

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l
authPriv -u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s $param*/

- Ajay/**/Sharma

/*
*/

On 11/25/19 4:35 AM, Дровалев Роман wrote:


Hello.

Tell me please. Is it possible with Net-SNMP to do the following?

I send the command to the agent:

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l
authPriv -u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s "parameter #1"
*/


for this OID, the script "program" is executed on the agent with
the "parameter #1" input for this script.

Is it possible to implement this?
What is the most suitable way for this?

/"parameter #1" - this can be, for example, curl request./

Thanks. Roman.



___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net  
<mailto:Net-snmp-users@lists.sourceforge.net>
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users



___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net  
<mailto:Net-snmp-users@lists.sourceforge.net>
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


-- 
С уважением, Дровалев Роман

Сетевой инженер ООО "Альфасатком"

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
<mailto:Net-snmp-users@lists.sourceforge.net>
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


--
С уважением, Дровалев Роман
Сетевой инженер ООО "Альфасатком"

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: running a script with a dynamic parameter

2019-11-26 Thread Larry Hayes
Have you tried this in your snmpd.conf file:

exec [MIBOID] NAME PROG ARGS

OR

sh [MIBOID] NAME PROG ARGS

   exec and sh extensions can only be configured via the snmpd.conf
file.  They cannot be set up via SNMP SET requests.

If you look in the snmpd.conf man pages, you will find more details, under
the EXTENDING AGENT FUNCTIONALITY section.

On Tue, Nov 26, 2019 at 12:50 AM Дровалев Роман 
wrote:

> Hello.
> Thanks for the quick response. I understand the script.
>
> How to implement this through the Net-SNMP?
> 1. I am editing a file /etc/snmp/snmpd.conf
>
> *pass .1.3.6.1.4.1.2021.8.4 test2  /usr/share/snmp/test2.sh*
>
> # cat test2.sh
>
>
> * #!/bin/sh /bin/cat $1 >> /tmp/test2.new *
>
>
> # *snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv
> -u snmpadmin 10.0.2.251 .1.3.6.1.4.1.2021.8.4 s 12*
> UCD-SNMP-MIB::extTable.4 = STRING: "12"
> File *test2.new* is not created! That is does not work.
>
> 2. Is it possible to create own MIB with the implementation of this
> functionality? How to make it work?
>
> Or is it possible to launch a script by accessing the OID only by editing
> file snmpd.conf?
>
> Thanks. Roman.
>
>
> 26.11.2019 3:11, Linux пишет:
>
> Is this what you are looking for? This would the content of your script
> "program".
>
> #!/bin/sh
>
> param=$1
>
> *snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv -u
> snmpadmin host_ip .1.4.6.1.3.35514.4.1 s $param*
>
> - Ajay Sharma
>
>
> On 11/25/19 4:35 AM, Дровалев Роман wrote:
>
> Hello.
>
> Tell me please. Is it possible with Net-SNMP to do the following?
>
> I send the command to the agent:
>
>
> *snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv -u
> snmpadmin host_ip .1.4.6.1.3.35514.4.1 s "parameter #1" *
>
>
> for this OID, the script "program" is executed on the agent with the
> "parameter #1" input for this script.
>
> Is it possible to implement this?
> What is the most suitable way for this?
>
> *"parameter #1" - this can be, for example, curl request.*
>
> Thanks. Roman.
>
>
> ___
> Net-snmp-users mailing listnet-snmp-us...@lists.sourceforge.net
> Please see the following page to unsubscribe or change other 
> options:https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>
>
> ___
> Net-snmp-users mailing listnet-snmp-us...@lists.sourceforge.net
> Please see the following page to unsubscribe or change other 
> options:https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
> --
> С уважением, Дровалев Роман
> Сетевой инженер ООО "Альфасатком"
>
> ___
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: running a script with a dynamic parameter

2019-11-25 Thread Дровалев Роман

Hello.
Thanks for the quick response. I understand the script.

How to implement this through the Net-SNMP?
1. I am editing a file /etc/snmp/snmpd.conf

/*pass .1.3.6.1.4.1.2021.8.4 test2  /usr/share/snmp/test2.sh*/

# cat test2.sh/*
#!/bin/sh
/bin/cat $1 >> /tmp/test2.new
*/


# /*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv 
-u snmpadmin 10.0.2.251 .1.3.6.1.4.1.2021.8.4 s 12*/

UCD-SNMP-MIB::extTable.4 = STRING: "12"

File /*test2.new*/ is not created! That is does not work.

2. Is it possible to create own MIB with the implementation of this 
functionality? How to make it work?


Or is it possible to launch a script by accessing the OID only by 
editing file snmpd.conf?


Thanks. Roman.


26.11.2019 3:11, Linux пишет:


Is this what you are looking for? This would the content of your 
script "program".


#!/bin/sh

param=$1

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv 
-u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s $param*/


- Ajay/**/Sharma

/*
*/

On 11/25/19 4:35 AM, Дровалев Роман wrote:


Hello.

Tell me please. Is it possible with Net-SNMP to do the following?

I send the command to the agent:

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l 
authPriv -u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s "parameter #1"

*/


for this OID, the script "program" is executed on the agent with the 
"parameter #1" input for this script.


Is it possible to implement this?
What is the most suitable way for this?

/"parameter #1" - this can be, for example, curl request./

Thanks. Roman.



___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users



___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


--
С уважением, Дровалев Роман
Сетевой инженер ООО "Альфасатком"

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: running a script with a dynamic parameter

2019-11-25 Thread Linux
Is this what you are looking for? This would the content of your script 
"program".


#!/bin/sh

param=$1

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv 
-u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s $param*/


- Ajay/**/Sharma

/*
*/

On 11/25/19 4:35 AM, Дровалев Роман wrote:


Hello.

Tell me please. Is it possible with Net-SNMP to do the following?

I send the command to the agent:

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv 
-u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s "parameter #1"

*/


for this OID, the script "program" is executed on the agent with the 
"parameter #1" input for this script.


Is it possible to implement this?
What is the most suitable way for this?

/"parameter #1" - this can be, for example, curl request./

Thanks. Roman.



___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


running a script with a dynamic parameter

2019-11-25 Thread Дровалев Роман

Hello.

Tell me please. Is it possible with Net-SNMP to do the following?

I send the command to the agent:

/*snmpset -v3 -a SHA -A STrP@SSWRD -x AES -X STr0ngP@SSWRD -l authPriv 
-u snmpadmin host_ip .1.4.6.1.3.35514.4.1 s "parameter #1"

*/


for this OID, the script "program" is executed on the agent with the 
"parameter #1" input for this script.


Is it possible to implement this?
What is the most suitable way for this?

/"parameter #1" - this can be, for example, curl request./

Thanks. Roman.

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


performing GETs within a subagent

2018-05-11 Thread Skiba, Bill
In an embedded linux application, I've successfully made a subagent that uses 
the 'Traditional API' in its servicing thread, rather than the 'Single API' 
(described in http://net-snmp.sourceforge.net/docs/README.thread.html).  That 
is, it uses register_readfd(), snmp_select_info(), 
netsnmp_external_event_info(), select(), netsnmp_dispatch_external_events(), 
snmp_read(), snmp_timeout(), run_alarms().  It uses AgentX to service SNMP 
operations from snmpd (running in a separate linux process).  The subagent 
successfully registers its handler callbacks (e.g. via netsnmp_register_scalar) 
and remote managers can perform GETs and SETs on the registered OIDs.

Now I need to make that subagent service traps.  I have the following questions:
1. Is there a Net-SNMP library API I can call to give it the trap OID plus a 
list of OIDs whose values should be sent in the trap, and have the library 
automatically GET the values, assemble the trap message and send it?

2. Or, do I need to write code myself to put the trap OID into a 
netsnmp_variable_list, then write code to GET the values and add them to that 
list, and then send the trap (e.g. send_v3trap) ?

3. If the answer to #2 is 'yes', should that be done by having the subagent 
send a GET to the snmpd agent?  If so, is this the correct way to do that?
3.a. After the subagent's existing code to init_agent and init_snmp, create 
a session (snmp_sess_init) and open it (snmp_open)
3.b. Call snmp_varlist_add_variable to add the trap OID to a 
netsnmp_variable_list
3.c. GET the value needed for the trap by:
    3.c.i. Call snmp_pdu_create to create a GET PDU
3.c.ii. Call snmp_add_null_var to add the OID for the needed value
3.c.iii. Call snmp_synch_response to GET the value
3.d. Call snmp_varlist_add_variable to add the retrieved value to the list
3.e. Call send_v3trap to send the list in a trap

4. Am I correct in understanding that all the lib API in (3.c) - (3.e) calls 
must to be done within the subagent's servicing thread (since the lib is not 
thread-safe)?

5. Do I need to convert the servicing thread to use the 'Single API' calls in 
order for this to work (and thus use the 'Single API' calls in (3) above to GET 
the values needed for the trap)?  Or will the 'Traditional API' calls that I'm 
currently using work ok?



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Loading a new MIB

2018-04-22 Thread Ran Shalit
Hello,

I'm new with net-snmp.
I've managed to cross compile and install net-snmp 5.6.2 on my device.
I also manage to start snmpd, and snmpwalk.
I than tried to add MIB:
I added the following to /usr/share/snmp/mibs
https://opensource.apple.com/source/net_snmp/net_snmp-10/net-snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt

I can use snmptranslate with the new MIB:
root@dm814x-evm:/usr/share/snmp/mibs#
root@dm814x-evm:/usr/share/snmp/mibs# snmptranslate -m
+NET-SNMP-EXAMPLES-MIB -IR -On netSnmpExamples
.1.3.6.1.4.1.8072.2

Yet, trying to snmpget or snmpwalk with this MIB keeps failing:

# snmpget -m +NET-SNMP-EXAMPLES-MIB -v 1 127.0.0.1 -c public
NET-SNMP-EXAMPLES-MIB::1.3.6.1.4.1.8072.2
No log handling enabled - using stderr logging
NET-SNMP-EXAMPLES-MIB::1.3.6.1.4.1.8072.2: Unknown Object Identifier

adding the MIB to snmpd.conf didn't help:
root@dm814x-evm:/usr/share/snmp/mibs# cat /home/root/.snmp/snmpd.conf
# this will make snmpd listen on all interfaces
agentAddress  udp:161

# open to all network (not secured)
rocommunity public

mibdirs /usr/share/snmp/mibs/
mibs +NET-SNMP-EXAMPLES-MIB
mibs +DEMO-MIB



Is there any idea what's wrong ?

Thank you!
ranran

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: trapsess/trap2sink seems to be opening a "local listen" port leading to rendering the system vulnerable.

2018-04-02 Thread Bill Fenner
The characterization of "rendering the system vulnerable" is a little
dramatic.  Since net-snmp never reads from this socket, the worst thing
that can happen is that packets can build up in the kernel.  Since the
address that it's bound to is the one used as the source address for traps,
you can't use 127.0.0.1; however, starting with net-snmp 5.8 you will be
able to specify a source address in the trap2sink configuration.  This will
still leave the socket available to "receive" packets sent to that address.

Would you be less alarmed if you saw

udp4   0  0 10.8.101.20.18748    *.*
?

It'd probably be a reasonable change to have net-snmp attempt to set
SO_RCVBUF to 0, to prevent packets from being able to build up in the
kernel.  That wouldn't change what you see in netstat, though.

  Bill


On Mon, Apr 2, 2018 at 7:52 AM, Ananth Laxminarasimhan (alaxmina) <
alaxm...@cisco.com> wrote:

> Hi,
>
> When I use the trapsess or trap2sink as follows to configure the agent to
> send traps to a target, I see that a local listen port is also opened.
>
>
>
> trapsess -v2c -cpublic 10.8.76.101
>
> or
>
> trap2sink 10.8.76.101 public
>
>
>
> When I run a netstat command to get the list of all listen ports that are *
> *NOT** opened with the localhost IP i.e. netstat -an | grep -iE
> 'udp.*\*\.' | grep -iEv '127.0.0.1',
>
> I see the following output:
>
> udp4   0  0 10.8.101.20.161*.*
>
> udp4   0  0 *.18748*.*
>
>
>
> Running the command, lsof | grep 18748 shows the following:
>
> snmpd 58163 root   12uIPv4 0xf80033366b10
> 0t0  UDP *:18748
>
>
>
> If I remove the trapsess/trap2sink directive, then this listen port is no
> longer opened.
>
>
>
> Why is this listen port opened on the local host when the trap target is a
> remote machine? Would a remote machine connect to this port?
>
> Since, it shows the port as “*.18478”, it has, most probably, been opened
> with INADDR_ANY.
>
> How can I change to listen on either : or
> <127.0.0.1>:?
>
> Would I need to change the code or can this be accomplished by an extra
> param(?) to the trap2sink/trapsess directive?
>
>
>
> Thanks,
>
> Ananth
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


trapsess/trap2sink seems to be opening a "local listen" port leading to rendering the system vulnerable.

2018-04-02 Thread Ananth Laxminarasimhan (alaxmina)
Hi,
When I use the trapsess or trap2sink as follows to configure the agent to send 
traps to a target, I see that a local listen port is also opened.

trapsess -v2c -cpublic 10.8.76.101
or
trap2sink 10.8.76.101 public

When I run a netstat command to get the list of all listen ports that are *NOT* 
opened with the localhost IP i.e. netstat -an | grep -iE 'udp.*\*\.' | grep 
-iEv '127.0.0.1',
I see the following output:
udp4   0  0 10.8.101.20.161*.*
udp4   0  0 *.18748*.*

Running the command, lsof | grep 18748 shows the following:
snmpd 58163 root   12uIPv4 0xf80033366b100t0  
UDP *:18748

If I remove the trapsess/trap2sink directive, then this listen port is no 
longer opened.

Why is this listen port opened on the local host when the trap target is a 
remote machine? Would a remote machine connect to this port?
Since, it shows the port as “*.18478”, it has, most probably, been opened with 
INADDR_ANY.
How can I change to listen on either : or 
<127.0.0.1>:?
Would I need to change the code or can this be accomplished by an extra 
param(?) to the trap2sink/trapsess directive?

Thanks,
Ananth

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Duplicate Traps being sent from a Sub Agent: unhandled PDU in logs

2018-03-19 Thread Larry Hayes
I tracked this down to probably being a multiple thread issue.
The mail loop which calls the API: agent_check_and_process() is in the main
process.
The call to sendTrap2 is in a thread.

What I see is the sendTrap2 logic is making the request to the snmpd, and
before it can put the request on the isp->requests list
the response is coming back into the main process loop and being process,
but since the isp->requests has not been updated, it becomes an un handled
PDU.
The sendTrap2 logic adds it to the isp->requests list and the request
eventually times out and a second trap is sent, which works correctly
because it is sent
withing the main loop.

So I had to get the sending of the Trap to the main loop of the process.
Which required not calling agent_check_and_process(), but writing my own
select statement and processing the snmp socket FDs in it and opening a
listening socket which the trap thread could
send a message to generate a trap, on the main loop processing.

Hope this helps others, that might run into the same issue.

Larry


On Thu, Mar 15, 2018 at 4:42 PM Larry Hayes  wrote:

> OS: Linux
> Net-snmp version: 5.7.3
>
> I have written a sub agent using the net-snmp library.
> This sub agent opens a web socket(uWs) to a web socket server and receives
> events.
> It takes the events and maps them to traps and calls the net-snmp library
> functions
> to forward the traps to snmpd, which forwards them out port 162.
> # snmpd -Lsd udp:0.0.0.0
> # subAgent  -Dsess_process_packet -d
>
> snmpd   < -- > subAgent  < -- > custom process
>
> Everything was going well until I did a popen() call from my subAgent to
> get the IP of the machine I am running on.
>
> (Maybe a coincidence) but now about 95% of the time, I get duplicate traps
> coming out of the net-snmp library of the subAgent.  If I do  not do the
> popen() then no duplicates are seen.
>
> When I trun on some debugging in the library, I see unhandled PDU, then a
> resend print.
> This seems to be causing the duplicated traps.
>
> Any Idea why the popen() would interfere with the library apis?
> The popen() and library calls are done by a thread of my subAgent.
>
>
>  sess_process_packet: received message id#0 reqid#2035863312 len 28
> {"method":"alertNtfn","params":{"code":1,"alertId":84,"state":"event","name":"CTRLR:1","type":"Configuration
> Update","severity":"info","description":"Configuration
> Update","modIndex":84,"delIndex":0}}
> Coinfiguration Update
> +++ popen(): ifconfig eth0 | grep 'inet addr:' | cut -d:
> -f2 | awk '{ print $1}'
> *sess_process_packet: sending message id#290792091 reqid#2035863313 len
> 212*
>
> Sending 212 bytes to Local IPC: /var/agentx/master
> : 01 0C 00 00  53 00 00 00  00 00 00 00  11 CF 58 79
> S.Xy
> 0016: C0 00 00 00  43 00 00 00  04 02 00 00  01 00 00 00
> C...
> 0032: 01 00 00 00  03 00 00 00  00 00 00 00  41 7B 17 00
> A{..
> 0048: 06 00 00 00  06 06 00 00  03 00 00 00  01 00 00 00
> 
> 0064: 01 00 00 00  04 00 00 00  01 00 00 00  00 00 00 00
> 
> 0080: 05 04 01 00  01 00 00 00  4E 2A 00 00  01 00 00 00
> N*..
> 0096: 00 00 00 00  22 00 00 00  04 00 00 00  05 04 00 00
> "...
> 0112: 01 00 00 00  4E 2A 00 00  02 00 00 00  0F 00 00 00
> N*..
> 0128: 00 00 00 00  00 00 00 00  04 00 00 00  05 04 00 00
> 
> 0144: 01 00 00 00  4E 2A 00 00  02 00 00 00  10 00 00 00
> N*..
> 0160: 00 00 00 00  00 00 00 00  04 00 00 00  05 04 00 00
> 
> 0176: 01 00 00 00  4E 2A 00 00  02 00 00 00  11 00 00 00
> N*..
> 0192: 00 00 00 00  0C 00 00 00  31 30 2E 32  30 2E 31 39
> 10.20.19
> 0208: 2E 31 38 0A   .18.
>
> sess_process_packet: session 0x88bd048 fd 8 pkt 0x88ea0a0 length 220
>
> Received 220 byte packet from Local IPC: abstract
> : 01 12 00 00  53 00 00 00  00 00 00 00  11 CF 58 79
> S.Xy
> 0016: C8 00 00 00  43 7B 17 00  00 00 00 00  43 00 00 00
> C{..C...
> 0032: 04 02 00 00  01 00 00 00  01 00 00 00  03 00 00 00
> 
> 0048: 00 00 00 00  41 7B 17 00  06 00 00 00  06 06 00 00
> A{..
> 0064: 03 00 00 00  01 00 00 00  01 00 00 00  04 00 00 00
> 
> 0080: 01 00 00 00  00 00 00 00  05 04 01 00  01 00 00 00
> 
> 0096: 4E 2A 00 00  01 00 00 00  00 00 00 00  22 00 00 00
> N*.."...
> 0112: 04 00 00 00  05 04 00 00  01 00 00 00  4E 2A 00 00
>

Duplicate Traps being sent from a Sub Agent: unhandled PDU in logs

2018-03-15 Thread Larry Hayes
OS: Linux
Net-snmp version: 5.7.3

I have written a sub agent using the net-snmp library.
This sub agent opens a web socket(uWs) to a web socket server and receives
events.
It takes the events and maps them to traps and calls the net-snmp library
functions
to forward the traps to snmpd, which forwards them out port 162.
# snmpd -Lsd udp:0.0.0.0
# subAgent  -Dsess_process_packet -d

snmpd   < -- > subAgent  < -- > custom process

Everything was going well until I did a popen() call from my subAgent to
get the IP of the machine I am running on.

(Maybe a coincidence) but now about 95% of the time, I get duplicate traps
coming out of the net-snmp library of the subAgent.  If I do  not do the
popen() then no duplicates are seen.

When I trun on some debugging in the library, I see unhandled PDU, then a
resend print.
This seems to be causing the duplicated traps.

Any Idea why the popen() would interfere with the library apis?
The popen() and library calls are done by a thread of my subAgent.


 sess_process_packet: received message id#0 reqid#2035863312 len 28
{"method":"alertNtfn","params":{"code":1,"alertId":84,"state":"event","name":"CTRLR:1","type":"Configuration
Update","severity":"info","description":"Configuration
Update","modIndex":84,"delIndex":0}}
Coinfiguration Update
+++ popen(): ifconfig eth0 | grep 'inet addr:' | cut -d:
-f2 | awk '{ print $1}'
*sess_process_packet: sending message id#290792091 reqid#2035863313 len 212*

Sending 212 bytes to Local IPC: /var/agentx/master
: 01 0C 00 00  53 00 00 00  00 00 00 00  11 CF 58 79S.Xy
0016: C0 00 00 00  43 00 00 00  04 02 00 00  01 00 00 00C...
0032: 01 00 00 00  03 00 00 00  00 00 00 00  41 7B 17 00A{..
0048: 06 00 00 00  06 06 00 00  03 00 00 00  01 00 00 00
0064: 01 00 00 00  04 00 00 00  01 00 00 00  00 00 00 00
0080: 05 04 01 00  01 00 00 00  4E 2A 00 00  01 00 00 00N*..
0096: 00 00 00 00  22 00 00 00  04 00 00 00  05 04 00 00"...
0112: 01 00 00 00  4E 2A 00 00  02 00 00 00  0F 00 00 00N*..
0128: 00 00 00 00  00 00 00 00  04 00 00 00  05 04 00 00
0144: 01 00 00 00  4E 2A 00 00  02 00 00 00  10 00 00 00N*..
0160: 00 00 00 00  00 00 00 00  04 00 00 00  05 04 00 00
0176: 01 00 00 00  4E 2A 00 00  02 00 00 00  11 00 00 00N*..
0192: 00 00 00 00  0C 00 00 00  31 30 2E 32  30 2E 31 3910.20.19
0208: 2E 31 38 0A   .18.

sess_process_packet: session 0x88bd048 fd 8 pkt 0x88ea0a0 length 220

Received 220 byte packet from Local IPC: abstract
: 01 12 00 00  53 00 00 00  00 00 00 00  11 CF 58 79S.Xy
0016: C8 00 00 00  43 7B 17 00  00 00 00 00  43 00 00 00C{..C...
0032: 04 02 00 00  01 00 00 00  01 00 00 00  03 00 00 00
0048: 00 00 00 00  41 7B 17 00  06 00 00 00  06 06 00 00A{..
0064: 03 00 00 00  01 00 00 00  01 00 00 00  04 00 00 00
0080: 01 00 00 00  00 00 00 00  05 04 01 00  01 00 00 00
0096: 4E 2A 00 00  01 00 00 00  00 00 00 00  22 00 00 00N*.."...
0112: 04 00 00 00  05 04 00 00  01 00 00 00  4E 2A 00 00N*..
0128: 02 00 00 00  0F 00 00 00  00 00 00 00  00 00 00 00
0144: 04 00 00 00  05 04 00 00  01 00 00 00  4E 2A 00 00N*..
0160: 02 00 00 00  10 00 00 00  00 00 00 00  00 00 00 00
0176: 04 00 00 00  05 04 00 00  01 00 00 00  4E 2A 00 00N*..
0192: 02 00 00 00  11 00 00 00  00 00 00 00  0C 00 00 00
0208: 31 30 2E 32  30 2E 31 39  2E 31 38 0A 10.20.19.18.





*sess_process_packet: received message id#0 reqid#2035863313 len
220sess_process_packet: unhandled PDUsess_process_packet: resending message
id#290792092 reqid#2035863313 rp_reqid#2035863313 rp_msgid#290792092 len
212*
Sending 212 bytes to Local IPC: /var/agentx/master
: 01 0C 00 00  53 00 00 00  00 00 00 00  11 CF 58 79S.Xy
0016: C0 00 00 00  43 00 00 00  04 02 00 00  01 00 00 00C...
0032: 01 00 00 00  03 00 00 00  00 00 00 00  41 7B 17 00A{..
0048: 06 00 00 00  06 06 00 00  03 00 00 00  01 00 00 00
0064: 01 00 00 00  04 00 00 00  01 00 00 00  00 00 00 00
0080: 05 04 01 00  01 00 00 00  4E 2A 00 00  01 00 00 00N*..
0096: 00 00 00 00  22 00 00 00  04 00 00 00  05 04 00 00"...
0112: 01 00 00 00  4E 2A 00 00  02 00 00 00  0F 00 00 00N*..
0128: 00 00 00 00  00 00 00 00  04 00 00 00  05 04 00 00
0144: 01 00 00 00  4E 2A 00 

snmpd hangup a startup

2018-01-17 Thread benoit.martin
Hello,

I wrote an snmp agent in perl,
my $agent = new NetSNMP::agent('Name' => 'myAgent');
$agent->register('myAgent version', OID, \&Handle);

On first server, it work well. Just installed net-snmp-perl and copied my agent 
under /usr/share/snmp/snmp_perl.pl file.
No need to add perl do "/usr/share/snmp/snmp_perl.pl" in smpd.conf

On second server tried the same but no luck...
I then added : perl do "/usr/share/snmp/snmp_perl.pl" in smpd.conf
Agent start but work 1 time ...
I added $agent->main_loop(); in perl code and agent work again !!
But snmpd daeomon startup didn't give me back the hand...stay stucked...

Do you have an idea ??

Reagrds,

Benoit



_

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Need for a Software Engineer w/ Expertise with net-SNMP Sunnyvale, CA.

2017-09-25 Thread Michael Yarochkin
Hello, Robin


Strange to see C and Ruby in one advertisement.

In any way, i can not apply on it. I have job and it is too far from me.


But you can count on me as a spare wheel. Or extra capacity. Or tester. Or code 
review. ...

Remote of course.


I am interesting in learning net-SNMP.


Mikl


From: Marsh, Robin (04812) 
Sent: Saturday, September 23, 2017 1:41:10 AM
To: net-snmp-users@lists.sourceforge.net
Subject: Need for a Software Engineer w/ Expertise with net-SNMP Sunnyvale, CA.

Hi group memebers,
Recruiting for a Software Engineer to fill an opportunity in Sunnyvale, CA.
Project: Development of cross-platform SNMP tool.

3 month contract.

•Strong C/C++ programmer
•Working experience of Ruby on Rails to build web applications
•Expertise in net-SNMP, database configuration and logging.

Please contact me to be considered,

Robin Marsh
Senior Technical Recruiter
415-434-4940 x 29687
robin.ma...@rht.com
Connect with us: 
LinkedIn<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=http%3A%2F%2Fwww.linkedin.com%2Fcompany%2Frobert-half-international&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>
 | Facebook<https://www.facebook.com/pages/Robert-Half/182444181913924> | 
Twitter<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=http%3A%2F%2Ftwitter.com%2F%23!%2Froberthalf&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>
 | 
YouTube<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=http%3A%2F%2Fwww.youtube.com%2Froberthalfna&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>
 | 
Google+<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=https%3A%2F%2Fplus.google.com%2F118121610550808947048%2Fposts&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>

Robert Half Technology | 10 Almaden Blvd | Suite 900 | San Jose | CA 95113 USA 
| rht.com

[sign]

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Need for a Software Engineer w/ Expertise with net-SNMP Sunnyvale, CA.

2017-09-22 Thread Marsh, Robin (04812)
Hi group memebers,
Recruiting for a Software Engineer to fill an opportunity in Sunnyvale, CA.
Project: Development of cross-platform SNMP tool.

3 month contract.

*Strong C/C++ programmer
*Working experience of Ruby on Rails to build web applications
*Expertise in net-SNMP, database configuration and logging.

Please contact me to be considered,

Robin Marsh
Senior Technical Recruiter
415-434-4940 x 29687
robin.ma...@rht.com
Connect with us: 
LinkedIn<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=http%3A%2F%2Fwww.linkedin.com%2Fcompany%2Frobert-half-international&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>
 | Facebook<https://www.facebook.com/pages/Robert-Half/182444181913924> | 
Twitter<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=http%3A%2F%2Ftwitter.com%2F%23!%2Froberthalf&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>
 | 
YouTube<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=http%3A%2F%2Fwww.youtube.com%2Froberthalfna&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>
 | 
Google+<http://t.sidekickopen54.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZscVSgKN7gsdfscW5ggW7dKLV856dMqLf1M2vkY02?t=https%3A%2F%2Fplus.google.com%2F118121610550808947048%2Fposts&si=5004337320034304&pi=2212ab2d-f8ef-48ce-99bb-fffeb52fa2aa>

Robert Half Technology | 10 Almaden Blvd | Suite 900 | San Jose | CA 95113 USA 
| rht.com

[sign]

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Processing traps in a real-time system

2017-08-22 Thread Wes Hardaker via Net-snmp-users
Joan Ametller Esquerra  writes:

> 1. Write a simple trap receiver by my own. The drawback is that
>looking at the code of snmptrapd I see a lot of library
>initializations I do not know about and I am not sure I have enough
>documentation to do it properly.

The right thing to do is implement a snmptrapd_handler, which you can
copy from one of the existing examples and adapt it.  See either
snmptrapd_log.c or snmptrapd_sql.c for example.
-- 
Wes Hardaker
USC/ISI

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Help writing a subagent

2017-08-10 Thread Bernardo Rodrigues
I'm trying to follow 
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent


This is my snmpd.conf file: https://pastebin.com/mCTXpbXM


This is my /usr/share/snmp/mibs: https://pastebin.com/8ryW8EVk


Trying the "quick and dirty" example: https://pastebin.com/K1ckRCfU


Trying the "hands on" example: https://pastebin.com/upD0Sggv

Can anyone help me?




[1485168441010_logotipo.png]
bernardo rodrigues
Desenvolvedor de Hardware - Hardware Developer
Tel: +55 (62) 39468060
Cel: +55 (62) 991829140
e-mail: bernardo.rodrig...@datatraffic.com.br




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Processing traps in a real-time system

2017-07-21 Thread Joan Ametller Esquerra
Hello,

I was trying to use snmptrapd in a real time system where the processing of
traps should be deterministic in terms of time. Therefore, for me it is not
an option to use the exec directrive since it implies the loading of a
binary and the overhead of its execution for each trap (which is not
deterministic in time).

There is some way to process traps in another way? It would be perfect a
think like loading a mib module within the snmptrapd to register callbacks
to specific trap reception but I suspect that this end is not possible.

The possibilities I am analyzing are the following ones:

1. Write a simple trap receiver by my own. The drawback is that looking at
the code of snmptrapd I see a lot of library initializations I do not know
about and I am not sure I have enough documentation to do it properly.

2. I've read that snmptrapd has an embedded agentx to notify trap
receptions to snmpd. Maybe trying to forward traps to snmpd using
NOTIFICATION-MIB-LOG and attaching a mib module with handlers to process
that would be an option

Anyone has a clue about any another simple way to do that properly that
maybe has escaped me?

Thank you,

J.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmpget on a broadcast address

2017-06-27 Thread Bill Fenner
On Wed, Jun 21, 2017 at 6:28 AM, Guru Prasad  wrote:

> Hi All,
>
> Using netsnmp-5.7.3 in a debian machine.
> I am trying to run snmpget on the network's broadcast address so as to get
> all
> the snmp agents in my network. But i could not get the response of the
> snmp agents at once. It gives the information of one snmp agent at a time
>
> snmpget -v2c -c public <192.168.1.25> 1.3.6.1.2.1.1.1.0
>
> Actually i have two snmp agents in my network.
> But getting only one agent's info at a time
>
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Debian-64 bit
>
> Running the above snmpget command after few seconds gives
>
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Ubuntu-32 bit
>
> But what i expect is
> snmpget -v2c -c public <192.168.1.25> 1.3.6.1.2.1.1.1.0 should give the
> following output
>
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Debian-64 bit (192.168.1.10)
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Ubuntu-32 bit (192.168.1.15)
>
> Why snmpget is not giving the output of all snmp agents at once?
>

snmpget is written to communicate with a single agent at once, and uses an
API that sends a single request and waits for a single reply.  The handling
of responses to a broadcast request would have to be handled differently,
waiting to gather responses from multiple agents.

The feature request for this different program is here:
https://sourceforge.net/p/net-snmp/feature-requests/18/
An alternative that teaches snmpget about ranges to query is here:
https://sourceforge.net/p/net-snmp/patches/505/

  Bill
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmpget on a broadcast address

2017-06-22 Thread Guru Prasad
Tried with snmpwalk on the broadcast address 192.168.1.25

snmpwalk -v2c  -c public <192.168.1.25> 1.3.6.1.2.1.1.1.0

sendmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161),
sin_addr=inet_addr("*192.168.1.25*")},
msg_iov(1)=[{"0)\2\1\1\4\6public\241\34\2\4\36;\4\337\2\1\0\2\1\\0160\f\6"...,
43}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 43
select(4, [3], NULL, NULL, {14, 88}) = 1 (in [3], left {14, 999729})
recvmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161),
sin_addr=inet_addr("*192.168.1.16*")},
msg_iov(1)=[{"03\2\1\1\4\6public\242&\2\4\36;\4\337\2\1\0\2\1\\0300\26\6"...,
65536}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = 53
getsockname(3, {sa_family=AF_INET, sin_port=htons(45826),
sin_addr=inet_addr("0.0.0.0")}, [16]) = 0
sendmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161),
sin_addr=inet_addr("*192.168.1.25*")},
msg_iov(1)=[{"0)\2\1\1\4\6public\240\34\2\4\36;\4\340\2\1\0\2\1\\0160\f\6"...,
43}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 43
select(4, [3], NULL, NULL, {14, 95}) = 1 (in [3], left {14, 91})
recvmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161),
sin_addr=inet_addr("*192.168.1.10*")},
msg_iov(1)=[{"03\2\1\1\4\6public\242&\2\4\36;\4\337\2\1\0\2\1\\0300\26\6"...,
65536}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = 53
getsockname(3, {sa_family=AF_INET, sin_port=htons(45826),
sin_addr=inet_addr("0.0.0.0")}, [16]) = 0
select(4, [3], NULL, NULL, {14, 999681}) = 1 (in [3], left {14, 999677})
recvmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161),
sin_addr=inet_addr("*192.168.1.15*")},
msg_iov(1)=[{"03\2\1\1\4\6public\242&\2\4\36;\4\337\2\1\0\2\1\\0300\26\6"...,
65536}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = 53
getsockname(3, {sa_family=AF_INET, sin_port=htons(45826),
sin_addr=inet_addr("0.0.0.0")}, [16]) = 0
select(4, [3], NULL, NULL, {14, 999480}) = 1 (in [3], left {14, 999477})
recvmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161),
sin_addr=inet_addr("*192.168.1.16*")},
msg_iov(1)=[{"0\201\200\2\1\1\4\6public\242s\2\4\36;\4\340\2\1\0\2\1\e0c"...,
65536}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = 131
getsockname(3, {sa_family=AF_INET, sin_port=htons(45826),
sin_addr=inet_addr("0.0.0.0")}, [16]) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f8bc2197000
write(1, "SNMPv2-MIB::sysDescr.0 = STRING:"..., 121SNMPv2-MIB::sysDescr.0 =
STRING: *Linux debian-abhilash* 3.16.0-4-amd64 #1 SMP Debian
3.16.36-1+deb8u2 (2016-10-19) x86_64


>From the above output we can see that, snmpwalk on broadcast ip
192.168.1.25, checks for the snmp agents in the following machines
192.168.1.16
192.168.1.10
192.168.1.15

But it prints the value "sysdescr" only for 192.168.1.16.

Please let me know what i am missing here.


Thanks
Guruprasad

On Wed, Jun 21, 2017 at 3:58 PM, Guru Prasad  wrote:

> Hi All,
>
> Using netsnmp-5.7.3 in a debian machine.
> I am trying to run snmpget on the network's broadcast address so as to get
> all
> the snmp agents in my network. But i could not get the response of the
> snmp agents at once. It gives the information of one snmp agent at a time
>
> snmpget -v2c -c public <192.168.1.25> 1.3.6.1.2.1.1.1.0
>
> Actually i have two snmp agents in my network.
> But getting only one agent's info at a time
>
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Debian-64 bit
>
> Running the above snmpget command after few seconds gives
>
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Ubuntu-32 bit
>
> But what i expect is
> snmpget -v2c -c public <192.168.1.25> 1.3.6.1.2.1.1.1.0 should give the
> following output
>
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Debian-64 bit (192.168.1.10)
> SNMPv2-MIB::sysDescr.0 = STRING: Linux Ubuntu-32 bit (192.168.1.15)
>
> Why snmpget is not giving the output of all snmp agents at once?
>
> Thanks
> Guruprasad
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmpget on a broadcast address

2017-06-22 Thread Guru Prasad
Hi All,

Using netsnmp-5.7.3 in a debian machine.
I am trying to run snmpget on the network's broadcast address so as to get
all
the snmp agents in my network. But i could not get the response of the snmp
agents at once. It gives the information of one snmp agent at a time

snmpget -v2c -c public <192.168.1.25> 1.3.6.1.2.1.1.1.0

Actually i have two snmp agents in my network.
But getting only one agent's info at a time

SNMPv2-MIB::sysDescr.0 = STRING: Linux Debian-64 bit

Running the above snmpget command after few seconds gives

SNMPv2-MIB::sysDescr.0 = STRING: Linux Ubuntu-32 bit

But what i expect is
snmpget -v2c -c public <192.168.1.25> 1.3.6.1.2.1.1.1.0 should give the
following output

SNMPv2-MIB::sysDescr.0 = STRING: Linux Debian-64 bit (192.168.1.10)
SNMPv2-MIB::sysDescr.0 = STRING: Linux Ubuntu-32 bit (192.168.1.15)

Why snmpget is not giving the output of all snmp agents at once?

Thanks
Guruprasad
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmpwalk not working with a community name with a backslash in it

2017-03-06 Thread christopher.wu
Apparently I do like to break the rules! :) 
 
Thank you so much for taking the time to do this testing. I use com2sec (and 
the other items) in the snmpd.conf file to declare my v2c community strings. It 
turns out that there's a discrepancy with how the backslash is handled in the 
code. One function treats it as an escape character and another does not.

I opened a bug report and submitted a patch:

https://sourceforge.net/p/net-snmp/bugs/2765/
 
 
 On Tue, 14 Feb 2017 23:57:55 -0800 Fredrik Björk 
wrote  
 > Hi! 
 > 
 > You really like to bend the rules, don't you :) Keep it up, I like it! 
 > 
 > I tried this in a Juniper EX: 
 > 
 > admin@EX2200# show snmp | display set 
 > set snmp community public authorization read-only 
 > set snmp community test authorization read-only 
 > set snmp community "test\\" authorization read-only" 
 > set snmp community "test\\test" authorization read-only 
 > 
 > It turned out kind of weird: 
 > 
 > admin@EX2200# show snmp 
 > community rwcomm { 
 > authorization read-only; 
 > client-list-name TELE2-MGMT; 
 > } 
 > community public { 
 > authorization read-only; 
 > } 
 > community test { 
 > authorization read-only; 
 > } 
 > community "test\\" authorization read-only"; <- Not the normal 
 > syntax, but checks out! 
 > community "test\\test" { 
 > authorization read-only; 
 > } 
 > 
 > committed and running... 
 > 
 > snmpbulkwalk -v 2c -c 'test\\test' 10.67.11.253 SNMPv2-MIB::sysDescr 
 > -m all 
 > SNMPv2-MIB::sysDescr.0 = STRING: Juniper Networks, Inc. ex2200-c-12p-2g 
 > Ethernet Switch, kernel JUNOS 15.1R1.8, Build date: 2015-05-29 08:09:50 
 > UTC Copyright (c) 1996-2015 Juniper Networks, Inc. 
 > 
 > # snmpbulkwalk -v 2c -c 'test\\test' 10.67.11.253 
 > SNMPv2-MIB::sysDescr 
 > -m all 
 > SNMPv2-MIB::sysDescr.0 = STRING: Juniper Networks, Inc. ex2200-c-12p-2g 
 > Ethernet Switch, kernel JUNOS 15.1R1.8, Build date: 2015-05-29 08:09:50 
 > UTC Copyright (c) 1996-2015 Juniper Networks, Inc. 
 > 
 > tcpdump of it: 
 > 
 > 08:42:53.851825 IP (tos 0x0, ttl 64, id 61330, offset 0, flags [DF], 
 > proto UDP (17), length 74) 
 > 10.67.11.11.50819 > 10.67.11.253.161: { SNMPv2c C=test\\test { 
 > GetBulk(27) R=578438959 N=0 M=10 .1.3.6.1.2.1.1.1 } } 
 > 08:42:53.893568 IP (tos 0x0, ttl 64, id 8022, offset 0, flags [none], 
 > proto UDP (17), length 400) 
 > 10.67.11.253.161 > 10.67.11.11.50819: { SNMPv2c C=test\\test { 
 > GetResponse(349) R=578438959 .1.3.6.1.2.1.1.1.0="Juniper Networks, Inc. 
 > ex2200-c-12p-2g Ethernet Switch, kernel JUNOS 15.1R1.8, Build date: 
 > 2015-05-29 08:09:50 UTC Copyright (c) 1996-2015 Juniper Networks, Inc." 
 > .1.3.6.1.2.1.1.2.0=.1.3.6.1.4.1.2636.1.1.1.2.43 
 > .1.3.6.1.2.1.1.3.0=851048621 .1.3.6.1.2.1.1.4.0="" 
 > .1.3.6.1.2.1.1.5.0="EX2200" .1.3.6.1.2.1.1.6.0="" .1.3.6.1.2.1.1.7.0=6 
 > .1.3.6.1.2.1.2.1.0=63 .1.3.6.1.2.1.2.2.1.1.4=4 .1.3.6.1.2.1.2.2.1.1.5=5 } } 
 > 
 > I also tried "test\test" for community and it worked (and sent 
 > "test\test" on the wire according to tcpdump). 
 > 
 > So, in the Juniper case, it actually works. JunOS seems to interpret the 
 > first "test \\" in a special way (seems to include the " in the 
 > process), but the others work like a charm. 
 > 
 > Even an Alcatel 6250-8M works: 
 > 
 > # snmpbulkwalk -v 2c -c 'test\\test' 10.67.11.5 SNMPv2-MIB::sysDescr 
 > -m all 
 > SNMPv2-MIB::sysDescr.0 = STRING: Alcatel-Lucent OS6250-8M 6.7.1.108.R04 
 > Service Release, January 04, 2017. 
 > 
 > 
 > That said, I wouldn't trust this method to work on any given system 
 > without testing, so I'd strongly advise against using \ in a community 
 > for devices where you may or may not have 100 % control of them. It 
 > could even be that in the next software release you put on a 
 > switch/router/... it stops working, not to mention how to use these 
 > special communities in different NMS applications. I'm pretty sure you 
 > can easily find a switch model that won't interpret the \ correctly in a 
 > community. Just because it works at one point, doesn't necessaily mean 
 > that it's a good idea to use it :) 
 > 
 > /Fredrik 
 > 
 > Den 2017-02-14 kl. 22:10, skrev christopher.wu: 
 > > I'm trying to determine if a community name or userid can contain a 
 > > backslash. I've created a v2c SNMP community name called "testing\" 
 > > and I cannot get it to work with an snmpwalk (I tried with version 5.7.3 
 > > on Linux). I realize that backslash is an escape character so I made sure 
 > >

Re: snmpwalk not working with a community name with a backslash in it

2017-02-15 Thread Fredrik Björk
Hi!

You really like to bend the rules, don't you :) Keep it up, I like it!

I tried this in a Juniper EX:

admin@EX2200# show snmp | display set
set snmp community public authorization read-only
set snmp community test authorization read-only
set snmp community "test\\" authorization read-only"
set snmp community "test\\test" authorization read-only

It turned out kind of weird:

admin@EX2200# show snmp
community rwcomm {
 authorization read-only;
 client-list-name TELE2-MGMT;
}
community public {
 authorization read-only;
}
community test {
 authorization read-only;
}
community "test\\" authorization read-only";   <- Not the normal 
syntax, but checks out!
community "test\\test" {
 authorization read-only;
}

committed and running...

snmpbulkwalk -v 2c -c 'test\\test'  10.67.11.253 SNMPv2-MIB::sysDescr -m all
SNMPv2-MIB::sysDescr.0 = STRING: Juniper Networks, Inc. ex2200-c-12p-2g 
Ethernet Switch, kernel JUNOS 15.1R1.8, Build date: 2015-05-29 08:09:50 
UTC Copyright (c) 1996-2015 Juniper Networks, Inc.

# snmpbulkwalk -v 2c -c 'test\\test'  10.67.11.253 SNMPv2-MIB::sysDescr 
-m all
SNMPv2-MIB::sysDescr.0 = STRING: Juniper Networks, Inc. ex2200-c-12p-2g 
Ethernet Switch, kernel JUNOS 15.1R1.8, Build date: 2015-05-29 08:09:50 
UTC Copyright (c) 1996-2015 Juniper Networks, Inc.

tcpdump of it:

08:42:53.851825 IP (tos 0x0, ttl 64, id 61330, offset 0, flags [DF], 
proto UDP (17), length 74)
 10.67.11.11.50819 > 10.67.11.253.161:  { SNMPv2c C=test\\test { 
GetBulk(27) R=578438959  N=0 M=10 .1.3.6.1.2.1.1.1 } }
08:42:53.893568 IP (tos 0x0, ttl 64, id 8022, offset 0, flags [none], 
proto UDP (17), length 400)
 10.67.11.253.161 > 10.67.11.11.50819:  { SNMPv2c C=test\\test { 
GetResponse(349) R=578438959  .1.3.6.1.2.1.1.1.0="Juniper Networks, Inc. 
ex2200-c-12p-2g Ethernet Switch, kernel JUNOS 15.1R1.8, Build date: 
2015-05-29 08:09:50 UTC Copyright (c) 1996-2015 Juniper Networks, Inc." 
.1.3.6.1.2.1.1.2.0=.1.3.6.1.4.1.2636.1.1.1.2.43 
.1.3.6.1.2.1.1.3.0=851048621 .1.3.6.1.2.1.1.4.0="" 
.1.3.6.1.2.1.1.5.0="EX2200" .1.3.6.1.2.1.1.6.0="" .1.3.6.1.2.1.1.7.0=6 
.1.3.6.1.2.1.2.1.0=63 .1.3.6.1.2.1.2.2.1.1.4=4 .1.3.6.1.2.1.2.2.1.1.5=5 } }

I also tried "test\test" for community and it worked (and sent 
"test\test" on the wire according to tcpdump).

So, in the Juniper case, it actually works. JunOS seems to interpret the 
first "test \\" in a special way (seems to include the " in the 
process), but the others work like a charm.

Even an Alcatel 6250-8M works:

# snmpbulkwalk -v 2c -c 'test\\test'  10.67.11.5 SNMPv2-MIB::sysDescr -m all
SNMPv2-MIB::sysDescr.0 = STRING: Alcatel-Lucent OS6250-8M 6.7.1.108.R04 
Service Release, January 04, 2017.


That said, I wouldn't trust this method to work on any given system 
without testing, so I'd strongly advise against using \ in a community 
for devices where you may or may not have 100 % control of them. It 
could even be that in the next software release you put on a 
switch/router/... it stops working, not to mention how to use these 
special communities in different NMS applications. I'm pretty sure you 
can easily find a switch model that won't interpret the \ correctly in a 
community. Just because it works at one point, doesn't necessaily mean 
that it's a good idea to use it :)

/Fredrik

Den 2017-02-14 kl. 22:10, skrev christopher.wu:
> I'm trying to determine if a community name or userid can contain a 
> backslash. I've created a v2c SNMP community name called "testing\" and I 
> cannot get it to work with an snmpwalk (I tried with version 5.7.3 on Linux). 
>  I realize that backslash is an escape character so I made sure to account 
> for that in the command line.
>
> snmpwalk -m ALL -M . -v 2c -c testing\\ 10.10.11.1 sysUpTime
> Timeout: No Response from 10.10.11.1
>
> I did a trace to verify that "testing\" is sent via the network.
>
> sudo tcpdump -n -vvv -i eth0 port 161
> tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 
> bytes
> 19:02:11.223073 IP (tos 0x0, ttl 64, id 26922, offset 0, flags [DF], proto 
> UDP (17), length 72)
>  10.10.11.2.44029 > 10.10.11.1.161: [bad udp cksum 0x2a5c -> 0x6912!]  { 
> SNMPv2c C=testing\ { GetNextRequest(27) R=1008098937  .1.3.6.1.2.1.1.3 } }
> 19:02:12.224149 IP (tos 0x0, ttl 64, id 26989, offset 0, flags [DF], proto 
> UDP (17), length 72)
>  10.10.11.2.44029 > 10.10.11.1.161: [bad udp cksum 0x2a5c -> 0x6912!]  { 
> SNMPv2c C=testing\ { GetNextRequest(27) R=1008098937  .1.3.6.1.2.1.1.3 } }
> 19:02:13.225253 IP (tos 0x0, ttl 64, id 27002, offset 0, flags [DF], proto 
> UDP (17), length 72)
>
> I even modified the code in netsnmp_udp_getSecName()

snmpwalk not working with a community name with a backslash in it

2017-02-14 Thread christopher.wu
I'm trying to determine if a community name or userid can contain a backslash. 
I've created a v2c SNMP community name called "testing\" and I cannot get it to 
work with an snmpwalk (I tried with version 5.7.3 on Linux).  I realize that 
backslash is an escape character so I made sure to account for that in the 
command line. 

snmpwalk -m ALL -M . -v 2c -c testing\\ 10.10.11.1 sysUpTime
Timeout: No Response from 10.10.11.1

I did a trace to verify that "testing\" is sent via the network.

sudo tcpdump -n -vvv -i eth0 port 161
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 
bytes
19:02:11.223073 IP (tos 0x0, ttl 64, id 26922, offset 0, flags [DF], proto UDP 
(17), length 72)
10.10.11.2.44029 > 10.10.11.1.161: [bad udp cksum 0x2a5c -> 0x6912!]  { 
SNMPv2c C=testing\ { GetNextRequest(27) R=1008098937  .1.3.6.1.2.1.1.3 } } 
19:02:12.224149 IP (tos 0x0, ttl 64, id 26989, offset 0, flags [DF], proto UDP 
(17), length 72)
10.10.11.2.44029 > 10.10.11.1.161: [bad udp cksum 0x2a5c -> 0x6912!]  { 
SNMPv2c C=testing\ { GetNextRequest(27) R=1008098937  .1.3.6.1.2.1.1.3 } } 
19:02:13.225253 IP (tos 0x0, ttl 64, id 27002, offset 0, flags [DF], proto UDP 
(17), length 72)

I even modified the code in netsnmp_udp_getSecName() to verify that "testing\" 
was being compared and both sides of the comparison had that value.

If I remove the backslash it works fine. Is backslash not allowed or is this a 
bug?


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Showing last row of a table

2017-01-18 Thread Giuseppe Longo
Hello,
I'm following the tutorial below to create a table:
http://www.net-snmp.org/dev/agent/data_set_8c-example.html

But what happens to me is that only the last row is shown, when I
should see more than once.
It looks very strange to me since the step are the same in the tutorial,
so could be that I am missing anything?

Thanks,
Regards.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: how to make a device snmp enabled??

2016-12-27 Thread Pushpa Thimmaiah
Hi,

1. Download net-snmp source code and use cross compiler to compile.
net-snmp souce code has text file 'INSTALL' , it has
more info on compiling net-snmp source code for different arch/platform.
2. After compilation, copy net-snmp libraries, config files and snmpd on to
hardware and run/execute snmpd

   snmp provides standard mibs(system, snmpframework etc...) verify
snmpget/snmpwalk snmpset commands .
You are able to manage the hardware. :)

3. To add your own mib (private mib). This needs practice, however tried to
explain briefly
[Ref:
http://net-snmp.sourceforge.net/wiki/index.php/TUT:mib2c_General_Overview
  http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mib_module/
  3a. Write mib file for the objects [Refer files inside net-snmp/mibs/]
  3b. Use tool 'mib2c' to generate template. They .c .h files (priv_mib.c
priv_mib.h) and only templates, its developer/organization must modify set
and get module according to requirement. [Refer already implemented
standard mibs eg: net-snmp/agent/mibgroup/]
  3c. copy .c and .h files (priv_mib.c priv_mib.h) to
net-snmp/agent/mibgroup/new_folder
   create new_folder.h in net-snmp/agent/mibgroup/new_folder.h and add
line 'config_require(new_folder/priv_mib)'
  3d. RECONFIGURE net-snmp  source code to compile your new priv_mib
i.e use  option '--with-mib-modules= append your mib' eg:
--with-mib-modules=new_folder
  3e:  RECOMPILE net-snmp source code, fix any compilation error
  3f: copy net-snmp libraries and snmpd on to the hardware
  3g: use snmpget to query on new mib

Hope it helps.

Thanks,
Pushpa.T

On Tue, Dec 27, 2016 at 2:09 PM, deepak.sachan deepak.sachan <
deepak.sac...@deal.drdo.in> wrote:

>
> Hello friends
>  We have developed a hardware /device for communication  purpose and we
> make it to SNMP enabled so that it can be remotely configured & Monitored .
> So what are the basic requirements. We have a processor with Linux OS on
> the device.
>  My main concern is How we developed MIB for that device. And how MIB can
> be integrate with snmp daemon.
>
> ​Thanks Deepak
>
>
> The contents of this Email communication are confidential to the
> addressee. If you
> are not the intended recipient you may not disclose or distribute this
> communication
> in any form should immediately contact the sender. The information,
> images, documents
> and views expressed in this Email are personal to the Sender and do not
> expressly or
> implicitly represent official positions of DRDO and no authority exists on
> behalf of
> DRDO to make any agreements, or other binding commitment by means of Email.
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


how to make a device snmp enabled??

2016-12-27 Thread deepak . sachan deepak . sachan

Hello friends
 We have developed a hardware /device for communication  purpose and we make it 
to SNMP enabled so that it can be remotely configured & Monitored .
So what are the basic requirements. We have a processor with Linux OS on the 
device.
 My main concern is How we developed MIB for that device. And how MIB can be 
integrate with snmp daemon.
​Thanks
Deepak 

 

 

 


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


About a specific MIB support

2016-09-21 Thread BYEONG-GI KIM
Hello.

I'm a new who is getting started to learn the net-snmp.

I have a question, does the net-snmp support a MIB defined RFC 7666 (
https://tools.ietf.org/html/rfc7666)?

I found some related info. from
https://github.com/michalklempa/net-snmp/blob/master/mibs/ianalist, but I'm
not sure how to use and install the mib with the net-snmp.

Thanks in advance.

Best regards

BGKIM
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmpwalk reason (generror) a general failure occurred

2016-09-08 Thread Suhasini Katuri
Hi,

When i tried to do 'snmpwalk and snmpgetnext' i'm getting the below
mentioned error.

[root@centOs67-19 ~]# snmpwalk -c cisco -v 2c 65.3.96.21
1.3.6.1.2.1.90.1.1.5
SNMPv2-SMI::mib-2.90.1.1.5.0 = Counter32: 0
Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::mib-2.90.1.1.5.0

[root@centOs67-19 ~]# snmpgetnext -c cisco -v 2c 65.3.96.21
SNMPv2-SMI::mib-2.90.1.1.4.0
SNMPv2-SMI::mib-2.90.1.1.5.0 = Counter32: 0
[root@centOs67-19 ~]# snmpgetnext -c cisco -v 2c 65.3.96.21
SNMPv2-SMI::mib-2.90.1.1.5.0
Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::mib-2.90.1.1.5.0

I've done snmpwalk without giving oid for all other mibs snmpwalk is
working fine but at this point i'm getting this error

DISMAN-EVENT-MIB::mteResourceSampleMinimum.0 = INTEGER: 0 seconds
DISMAN-EVENT-MIB::mteResourceSampleInstanceMaximum.0 = Gauge32: 0 instances
DISMAN-EVENT-MIB::mteResourceSampleInstances.0 = Gauge32: 0 instances
DISMAN-EVENT-MIB::mteResourceSampleInstancesHigh.0 = Gauge32: 0 instances
DISMAN-EVENT-MIB::mteResourceSampleInstanceLacks.0 = Counter32: 0 instances
DISMAN-EVENT-MIB::mteTriggerFailures.0 = Counter32: 0 failures
DISMAN-EVENT-MIB::mteEventFailures.0 = Counter32: 0
SNMPv2-SMI::mib-2.90.1.1.1.0 = INTEGER: 0
SNMPv2-SMI::mib-2.90.1.1.2.0 = Gauge32: 0
SNMPv2-SMI::mib-2.90.1.1.3.0 = Gauge32: 0
SNMPv2-SMI::mib-2.90.1.1.4.0 = Gauge32: 0
SNMPv2-SMI::mib-2.90.1.1.5.0 = Counter32: 0
Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::mib-2.90.1.1.5.0

could you please help me, what exactly the reason behind this.



-- 
Thanks & Regards,

 suhasini katuri
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


is there a function to free memory from get_tree?

2016-08-16 Thread Ron Swiernik
I am writing an application that gets some object from UPS's. One is the status 
which
I am using get_tree to pull out the formated string. It works but the 
application seems
to be using more memory as time goes on. I do not use memory allocation function
in my code. I am closing the the other objects using snmp_free_pdu and 
snmp_close
and SOCK_CLEANUP, so I am thinking it is the get_tree. 

Is the a function to deallocate the object(s) created ?

code snippet below
-

if( ups_sensor_table[table_index].sensor_type == 2 )
{
/* get the mib entry for this object */
tp = get_tree( anOID, anOID_len, 
get_tree_head());
object_type = tp->type;
if(tp->enums)
{
struct enum_list *ep = tp->enums;
while( integer_oid_value != ep->value )
{
ep = ep->next;
}
snprintf( object_name, MAX_OID_LEN, 
"%s", ep->label);
}
else
{
object_name[0] = '\0';
}
#ifdef DEBUG
printf("ups polling DEBUG: host is %s, object_type is %d, object_name 
is %s \n", ups_sensor_table[table_index].host
_name, object_type, object_name );
#endif
 
if( object_type == 3 )
{
strcpy( 
ups_location_table[site_index].status, object_name );
}
}

---

ron.swier...@sdf.org
SDF Public Access UNIX System - http://sdf.org

--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How to specify a simple regex for snap trap handler registration in perl

2016-07-26 Thread Sateesh Hegde
Hi,
My snmptrapd.conf has something like following

ignoreAuthFailure yes
disableAuthorization yes
donotlogtraps true
outputOption ft
perl NetSNMP::TrapReceiver::register("default", \&my_receiver);
perl do "/etc/snmp/traphandler.pl";
perl NetSNMP::TrapReceiver::register("1.3.6.1.4.1.98765.1.1.7.
<http://1.3.6.1.4.1.29671.1.1.7.*>1", \&my_receiver_test);


However, I would like to handle a range of trap OIDS below the 7. tree.  I
know it works with simple

traphandle hook , but didn't work on this perl, tried the following :

perl NetSNMP::TrapReceiver::register("1.3.6.1.4.1.98765.1.1.7.
<http://1.3.6.1.4.1.29671.1.1.7.*>*", \&my_receiver_test);

 It doesn't seem to work. Any help please ?


Thanks
-- 
Sateesh Hegde
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Developing SNMP agent for a new switch

2016-05-25 Thread Vered Zvi
Hi David, All,

Upon snmpd start I got the following prints:
registered debug token verbose:ifTable:ifSpeed_get, 1
registered debug token verbose:ifTable:ifPhysAddress_get, 1
registered debug token verbose:ifTable:ifAdminStatus_get, 1
registered debug token verbose:ifTable:ifOperStatus_get, 1
registered debug token verbose:ifTable:init_ifTable, 1
registered debug token verbose:ifTable:initialize_table_ifTable, 1
registered debug token verbose:ifTable:ifTable_rowreq_ctx_init, 1
registered debug token verbose:ifTable:ifTable_pre_request, 1
registered debug token verbose:ifTable:ifDescr_get, 1

So it seems I enabled logging for ifSpeed (for example).

Then from MIB browser (iReasoning) I sent an ifSpeed request and got the 
following message:

No data available (127.0.0.1)
OID: ifSpeed

This response was fast.

When I tried sending sysDescr I got a response with data ( Linux 
localhost.localdomain ...)
In /var/log/snmpd.log I got no further messages.
I expected to get:
DEBUGMSGTL(("verbose:ifTable:ifSpeed_get", "called\n"));

Should I add the if-mib to the agent ?

Best regards,
Z.V

From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Tuesday, May 24, 2016 9:15 AM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

It depends on what you want to see... AFAIK, the -DdebugTag enables the tracing 
of "Debug Message" in the code when calling, e.g. DEBUGMSGTL(("debugTag", 
"Debug Message"));

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: martes, 24 de mayo de 2016 4:44
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David, All,

As you wrote, -D gives a log of debug messages.
What TOKEN I can put after -D in order to filter ?

Best regards,
Z.V

From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Tuesday, May 17, 2016 12:49 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi,

You can specify the log file with option -Lf, e.g.: -Lf /var/log/snmpd.log

The option to write Debug information is -D, but use it with just what you want 
to see, because enabling all DEBUG info is a lot of info being written to the 
log file.

I don't know what to say about "basic SNMP OIDs, MIBs that every switch 
supports". If you have a competitor product, buy it and check it. But I think 
it is more interesting to survey netadmins to see what are they using rather 
than implementing a lot of unused features.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: sábado, 14 de mayo de 2016 
21:13
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David, All,

If I install snmpd without any changes and send a valid SNMP request,

is there a way to run snmpd so it will print some debug messages upon an SNMP 
request ?

Where can I find a list of basic SNMP OIDs, MIBs that every switch supports ?

Best regards,
Z.V


From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Friday, May 06, 2016 11:05 AM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi Zvika,

Try to run snmpd on your x86 CPU either by installing the Net-SNMP for the 
corresponding operating system or compiling it from the sources.

Configuring Net-SNMP: snmpconf -i

The recommended way to start snmpd is with the following command line:
/usr/sbin/snmpd 
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable

Then, you can see what information it provides with:
$ snmpwalk -v 1 -c public localhost .iso

The traps supported will depend on the supported MIBs. You must configure snmpd 
to send traps, e.g. at the configuration file snmpd.conf. Then you can run 
snmptrapd to get the traps from snmpd.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: viernes, 06 de mayo de 
2016 4:50
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Devel

RE: Developing SNMP agent for a new switch

2016-05-23 Thread Fernández Piñas , David
It depends on what you want to see... AFAIK, the -DdebugTag enables the tracing 
of "Debug Message" in the code when calling, e.g. DEBUGMSGTL(("debugTag", 
"Debug Message"));

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: martes, 24 de mayo de 2016 4:44
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David, All,

As you wrote, -D gives a log of debug messages.
What TOKEN I can put after -D in order to filter ?

Best regards,
Z.V

From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Tuesday, May 17, 2016 12:49 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi,

You can specify the log file with option -Lf, e.g.: -Lf /var/log/snmpd.log

The option to write Debug information is -D, but use it with just what you want 
to see, because enabling all DEBUG info is a lot of info being written to the 
log file.

I don't know what to say about "basic SNMP OIDs, MIBs that every switch 
supports". If you have a competitor product, buy it and check it. But I think 
it is more interesting to survey netadmins to see what are they using rather 
than implementing a lot of unused features.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: sábado, 14 de mayo de 2016 
21:13
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David, All,

If I install snmpd without any changes and send a valid SNMP request,

is there a way to run snmpd so it will print some debug messages upon an SNMP 
request ?

Where can I find a list of basic SNMP OIDs, MIBs that every switch supports ?

Best regards,
Z.V


From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Friday, May 06, 2016 11:05 AM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi Zvika,

Try to run snmpd on your x86 CPU either by installing the Net-SNMP for the 
corresponding operating system or compiling it from the sources.

Configuring Net-SNMP: snmpconf -i

The recommended way to start snmpd is with the following command line:
/usr/sbin/snmpd 
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable

Then, you can see what information it provides with:
$ snmpwalk -v 1 -c public localhost .iso

The traps supported will depend on the supported MIBs. You must configure snmpd 
to send traps, e.g. at the configuration file snmpd.conf. Then you can run 
snmptrapd to get the traps from snmpd.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: viernes, 06 de mayo de 
2016 4:50
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: jueves, 05 de mayo de 2016 
11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of thi

RE: Developing SNMP agent for a new switch

2016-05-23 Thread Vered Zvi
Hi David, All,

As you wrote, -D gives a log of debug messages.
What TOKEN I can put after -D in order to filter ?

Best regards,
Z.V

From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Tuesday, May 17, 2016 12:49 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi,

You can specify the log file with option -Lf, e.g.: -Lf /var/log/snmpd.log

The option to write Debug information is -D, but use it with just what you want 
to see, because enabling all DEBUG info is a lot of info being written to the 
log file.

I don't know what to say about "basic SNMP OIDs, MIBs that every switch 
supports". If you have a competitor product, buy it and check it. But I think 
it is more interesting to survey netadmins to see what are they using rather 
than implementing a lot of unused features.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: sábado, 14 de mayo de 2016 21:13
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David, All,

If I install snmpd without any changes and send a valid SNMP request,

is there a way to run snmpd so it will print some debug messages upon an SNMP 
request ?

Where can I find a list of basic SNMP OIDs, MIBs that every switch supports ?

Best regards,
Z.V


From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Friday, May 06, 2016 11:05 AM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi Zvika,

Try to run snmpd on your x86 CPU either by installing the Net-SNMP for the 
corresponding operating system or compiling it from the sources.

Configuring Net-SNMP: snmpconf -i

The recommended way to start snmpd is with the following command line:
/usr/sbin/snmpd 
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable

Then, you can see what information it provides with:
$ snmpwalk -v 1 -c public localhost .iso

The traps supported will depend on the supported MIBs. You must configure snmpd 
to send traps, e.g. at the configuration file snmpd.conf. Then you can run 
snmptrapd to get the traps from snmpd.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: viernes, 06 de mayo de 
2016 4:50
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: jueves, 05 de mayo de 2016 
11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves ap

RE: Developing SNMP agent for a new switch

2016-05-17 Thread Fernández Piñas , David
Hi,

You can specify the log file with option -Lf, e.g.: -Lf /var/log/snmpd.log

The option to write Debug information is -D, but use it with just what you want 
to see, because enabling all DEBUG info is a lot of info being written to the 
log file.

I don't know what to say about "basic SNMP OIDs, MIBs that every switch 
supports". If you have a competitor product, buy it and check it. But I think 
it is more interesting to survey netadmins to see what are they using rather 
than implementing a lot of unused features.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: sábado, 14 de mayo de 2016 21:13
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David, All,

If I install snmpd without any changes and send a valid SNMP request,

is there a way to run snmpd so it will print some debug messages upon an SNMP 
request ?

Where can I find a list of basic SNMP OIDs, MIBs that every switch supports ?

Best regards,
Z.V


From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Friday, May 06, 2016 11:05 AM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi Zvika,

Try to run snmpd on your x86 CPU either by installing the Net-SNMP for the 
corresponding operating system or compiling it from the sources.

Configuring Net-SNMP: snmpconf -i

The recommended way to start snmpd is with the following command line:
/usr/sbin/snmpd 
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable

Then, you can see what information it provides with:
$ snmpwalk -v 1 -c public localhost .iso

The traps supported will depend on the supported MIBs. You must configure snmpd 
to send traps, e.g. at the configuration file snmpd.conf. Then you can run 
snmptrapd to get the traps from snmpd.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: viernes, 06 de mayo de 
2016 4:50
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: jueves, 05 de mayo de 2016 
11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-us

RE: Developing SNMP agent for a new switch

2016-05-14 Thread Vered Zvi
Hi David, All,

If I install snmpd without any changes and send a valid SNMP request,

is there a way to run snmpd so it will print some debug messages upon an SNMP 
request ?

Where can I find a list of basic SNMP OIDs, MIBs that every switch supports ?

Best regards,
Z.V


From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Friday, May 06, 2016 11:05 AM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi Zvika,

Try to run snmpd on your x86 CPU either by installing the Net-SNMP for the 
corresponding operating system or compiling it from the sources.

Configuring Net-SNMP: snmpconf -i

The recommended way to start snmpd is with the following command line:
/usr/sbin/snmpd 
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable

Then, you can see what information it provides with:
$ snmpwalk -v 1 -c public localhost .iso

The traps supported will depend on the supported MIBs. You must configure snmpd 
to send traps, e.g. at the configuration file snmpd.conf. Then you can run 
snmptrapd to get the traps from snmpd.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: viernes, 06 de mayo de 2016 4:50
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: jueves, 05 de mayo de 2016 
11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you ar

Re: Best practice to get counters from a huge amount of routers.

2016-05-12 Thread Laurent Dumont
A bit late on this but with your scale, it's definitely worth looking 
into monitoring solutions based around SNMP. Solutions like Shinken, 
Nagios and Icinga are all designed around snmp polling and can probably 
be tuned for 1 or 5 seconds polling for your metrics. You can even send 
all the data into InfluxDB and make pretty graphs with Grafana.

Writing your own tool seems overkill for this.

Cheers!

Laurent

On 5/7/2016 11:20 AM, Richard Mayers wrote:
> Hi folks,
>
> For my master thesis I am doing a load balancing project and I have to
> know the link usage if possible every second. For that I set the
> refresh interval to 1 second, so every thing is good so far.
>
> My problem is that I am working with big topologies and I may have 200
> or more routers. If I get the counters polling it takes forever I can
> not poll the routers one by one, or not even using threads (at some
> point it would not scale).
>
> What would be the best way to get all the counters ?
>
> Since I am simulating everything in a single machine I can do a trick
> and write the counters in a file, however that will not be useful when
> I test my solution in a real network.
>
> Kind regards,
> Richard
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Best practice to get counters from a huge amount of routers.

2016-05-09 Thread Andrew
There's netflow/sflow for real-time traffic counting/monitoring.

08.05.2016 13:11, Richard Mayers пишет:
> Hi,
>
> Thanks for the replies.
>
> What about using Traps? Can I make the routers send me the counters
> every second ? Is it hard to set up?
>
> Kind regards,
> Richard
>
> 2016-05-07 20:56 GMT+02:00 James Leu :
>> For my day job we tried  open source packages for SNMP polling
>> like:
>>
>> mrtg
>> cricket
>>
>> They were fine for small numbers and long intervals, but will not scale to
>> your usage.
>>
>> I  wrote an implementation from scratch that handles 10K variables
>> on 5 minute interval. So it can be done.
>>
>> Issues I think you will run into:
>>
>> router CPU:  hitting a device every second for a number of interfaces may 
>> consume
>>  too much CPU time to be practical.
>>
>> storage IO: if you are successful in retrieving the data, standard DB storage
>> even RRD will not be able to handle the IO load
>>
>> Things to consider:
>>
>> Bulk SNMP gets
>> RMON
>> local device scripting, I believe Cisco routers can do local TCL scripting
>> and junos based devices have local scripting as well.
>>
>> Directory based queues with small files storing samples
>>
>> Good luck with your work.
>>
>> On Sat, May 07, 2016 at 05:20:53PM +0200, Richard Mayers wrote:
>>> Hi folks,
>>>
>>> For my master thesis I am doing a load balancing project and I have to
>>> know the link usage if possible every second. For that I set the
>>> refresh interval to 1 second, so every thing is good so far.
>>>
>>> My problem is that I am working with big topologies and I may have 200
>>> or more routers. If I get the counters polling it takes forever I can
>>> not poll the routers one by one, or not even using threads (at some
>>> point it would not scale).
>>>
>>> What would be the best way to get all the counters ?
>>>
>>> Since I am simulating everything in a single machine I can do a trick
>>> and write the counters in a file, however that will not be useful when
>>> I test my solution in a real network.
>>>
>>> Kind regards,
>>> Richard
>>>
>>> --
>>> Find and fix application performance issues faster with Applications Manager
>>> Applications Manager provides deep performance insights into multiple tiers 
>>> of
>>> your business applications. It resolves application problems quickly and
>>> reduces your MTTR. Get your free trial!
>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>> ___
>>> Net-snmp-users mailing list
>>> Net-snmp-users@lists.sourceforge.net
>>> Please see the following page to unsubscribe or change other options:
>>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>>
>> --
>> James R. Leu
>> j...@mindspring.com
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Best practice to get counters from a huge amount of routers.

2016-05-09 Thread Fredrik Björk
Hi again!

If that's all you need, you do a walk with PHP (or faster alternative) 
and push the data into a database with a timestamp. From there you can 
monitor the links as often as you like, just as long as you remember 
that the data you read is as old as the pollings feeding the dB with data.


$ifInOctArray=snmp2_real_walk($RouterIP, $community, 
"IF-MIB::ifHCInOctets") or die("$argv[0]: unable to walk OID 
IF-MIB::ifHCInOctets");
$ifOutOctArray=snmp2_real_walk($RouterIP, $community, 
"IF-MIB::ifHCOutOctets") or die("$argv[0]: unable to walk OID 
IF-MIB::ifHCOutOctets");

Stuff it into your dB of choise and start reading the data! Use 
ifHCOutOctets instead of ifOutOctets since the 32-bit counters in the 
latter will top out at ~500 Mbps if polling every minute.

Use this to graph the data directly from the dB (if you need to create 
graphs, if not, just read the data from the dB):

https://oss.oetiker.ch/rrdtool/doc/rrdgraph_libdbi.en.html

/Fredrik

Den 2016-05-09 kl. 15:16, skrev Richard Mayers:
> I don't really know what to do, I need to know the load per link as
> fast as possible so I can improve the load balancing decisions.


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Best practice to get counters from a huge amount of routers.

2016-05-09 Thread James Leu
RMON might come in usefull.  If you configure each interface for the
statistics group with 300 buckets and an interval of 1 second
you will receive a trap every 300 seconds teling you the buckets are
full and you will need the poll the node to gather the data then issue a
reset, which will empty the buckets. Using RMON in this way can be very
memory intensive.

On Sun, May 08, 2016 at 12:11:02PM +0200, Richard Mayers wrote:
> Hi,
> 
> Thanks for the replies.
> 
> What about using Traps? Can I make the routers send me the counters
> every second ? Is it hard to set up?
> 
> Kind regards,
> Richard
> 
> 2016-05-07 20:56 GMT+02:00 James Leu :
> > For my day job we tried  open source packages for SNMP polling
> > like:
> >
> > mrtg
> > cricket
> >
> > They were fine for small numbers and long intervals, but will not scale to
> > your usage.
> >
> > I  wrote an implementation from scratch that handles 10K variables
> > on 5 minute interval. So it can be done.
> >
> > Issues I think you will run into:
> >
> > router CPU:  hitting a device every second for a number of interfaces may 
> > consume
> > too much CPU time to be practical.
> >
> > storage IO: if you are successful in retrieving the data, standard DB 
> > storage
> > even RRD will not be able to handle the IO load
> >
> > Things to consider:
> >
> > Bulk SNMP gets
> > RMON
> > local device scripting, I believe Cisco routers can do local TCL scripting
> > and junos based devices have local scripting as well.
> >
> > Directory based queues with small files storing samples
> >
> > Good luck with your work.
> >
> > On Sat, May 07, 2016 at 05:20:53PM +0200, Richard Mayers wrote:
> >> Hi folks,
> >>
> >> For my master thesis I am doing a load balancing project and I have to
> >> know the link usage if possible every second. For that I set the
> >> refresh interval to 1 second, so every thing is good so far.
> >>
> >> My problem is that I am working with big topologies and I may have 200
> >> or more routers. If I get the counters polling it takes forever I can
> >> not poll the routers one by one, or not even using threads (at some
> >> point it would not scale).
> >>
> >> What would be the best way to get all the counters ?
> >>
> >> Since I am simulating everything in a single machine I can do a trick
> >> and write the counters in a file, however that will not be useful when
> >> I test my solution in a real network.
> >>
> >> Kind regards,
> >> Richard
> >>
> >> --
> >> Find and fix application performance issues faster with Applications 
> >> Manager
> >> Applications Manager provides deep performance insights into multiple 
> >> tiers of
> >> your business applications. It resolves application problems quickly and
> >> reduces your MTTR. Get your free trial!
> >> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> >> ___
> >> Net-snmp-users mailing list
> >> Net-snmp-users@lists.sourceforge.net
> >> Please see the following page to unsubscribe or change other options:
> >> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> >
> >
> > --
> > James R. Leu
> > j...@mindspring.com


-- 
James R. Leu
j...@mindspring.com

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Best practice to get counters from a huge amount of routers.

2016-05-09 Thread Fredrik Björk

Hi!

Yes, lots of things to consider... I have done some information 
gathering on CMTSes (cable modem routers) reading out several thousamd 
parameters. In general I can say that an snmpBULKwalk (command line) or 
its equivalents in other languages are MUCH faster than reading 
individual objects if you need several adjecent objects.


# time for ((i=1001 ; i-1025 ; i++)) ; do snmpget -v 2c -c public 
192.168.8.51 IF-MIB::ifInOctets.$i; done

IF-MIB::ifInOctets.1001 = Counter32: 1105357170
...
real0m0.386s
user0m0.316s
sys 0m0.020s

# time snmpbulkwalk -v 2c -c public 192.168.8.51 IF-MIB::ifInOctets
IF-MIB::ifInOctets.1001 = Counter32: 1105357170
...
real0m0.055s
user0m0.008s
sys 0m0.008s

Above, the snmpbulkwalk even reads three extra OIDs. Obviously, CLI/bash 
is not the way to go when you have a need for speed, I just used it to 
demonstrate the difference. The waiting time is mostly in the switch 
anyway. I have used PHP, and that's not optimal, but good enough for my 
needs.


If you need, for instance, most info from the ifEntry-tree, like the red 
ones below:


IF-MIB::ifIndex.1001 = INTEGER: 1001
IF-MIB::ifDescr.1001 = STRING: Alcatel-Lucent 1/1
IF-MIB::ifType.1001 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1001 = INTEGER: 9216
IF-MIB::ifSpeed.1001 = Gauge32: 0
IF-MIB::ifPhysAddress.1001 = STRING: e8:e7:32:2:c5:2a
IF-MIB::ifAdminStatus.1001 = INTEGER: up(1)
IF-MIB::ifOperStatus.1001 = INTEGER: down(2)
IF-MIB::ifLastChange.1001 = Timeticks: (4100) 5 days, 15:48:01.00
IF-MIB::ifInOctets.1001 = Counter32: 1105357170
IF-MIB::ifInUcastPkts.1001 = Counter32: 159748417
IF-MIB::ifInNUcastPkts.1001 = Counter32: 0
IF-MIB::ifInDiscards.1001 = Counter32: 0
IF-MIB::ifInErrors.1001 = Counter32: 0
IF-MIB::ifInUnknownProtos.1001 = Counter32: 0
IF-MIB::ifOutOctets.1001 = Counter32: 1778801908
IF-MIB::ifOutUcastPkts.1001 = Counter32: 2041113484
IF-MIB::ifOutNUcastPkts.1001 = Counter32: 0
IF-MIB::ifOutDiscards.1001 = Counter32: 23
IF-MIB::ifOutErrors.1001 = Counter32: 0
IF-MIB::ifOutQLen.1001 = Gauge32: 0
IF-MIB::ifSpecific.1001 = OID: SNMPv2-SMI::zeroDotZero

I'd definitely recommand walking the entire ifEntry tree instead of 
walking several separate walks (again, cli ony for educational purposes):


snmpbulkwalk  -v 2c -c public 192.168.38.51 IF-MIB::ifEntry -m all

It will probably be much more efficient to discard the extra info (black 
lines above) instead of doing multiple walks. I think your 
switches/routers will agree too, but that's very vendor- and even 
product dependent. The downside is a little more traffic over the 
network, but I'd say it's negligable.


I store all values retrieved in a database (I use MySQL or Postgres, but 
choice is free) and then I can have the front-end pick out values 
whenever convenient.


I even use the "bulkwalk" strategy to monitor almost 250 emergency 
phones spread on 28 AudioCodes phone-to-SIP concentrators for a 
customer. We can detect a "hook off" event in less than 5 seconds (the 
criteria) by using 4 or 5 parallell jobs that walk the AudioCodes units 
constantly. There are 24 ports in each unit, so selecting only the 
active ports and reading just those would have required way more time 
and essentially lots of parallell jobs.


There are functions in sFlow and similar that can send/push info on the 
amount of traffic to an sFlow server if traffic volumes are all you're 
interested in. I'm often also interested in errors, queues and so on, 
but I could settle for sFlow based traffic every minute and poll errors 
and such less often.


/Fredrik


Den 2016-05-09 kl. 11:25, skrev Jurkiewicz Jean-Marc:
Hi, Like James, I wrote tools that handle several 10K variables on 5 
minute interval. I am not at all trying to discourage you in your 
project. There are some concern you should keep in mind: Please always 
remember that the primary role of the network / network equipment you 
try to manage is to transport data. I mean payload data, not 
management data. Have you estimated/calculated the ration of the 
bandwidth you will consume "just" for management? (You did not mention 
how many counters per routers you intend to collect data about.) 
Measurement should not bias measured (or only to a minimal extend). 
Switchs and routers are not designed to assist to this extend, the 
management station. SNMP is not the best method (high CPU load, low 
priority on the equipment) => How about Netflow ( nfsen is a wonderful 
free tool , if you accept 5 min. period) There is a big difference 
between what can be done and what make sense to be done. In any way 
Get-bulk (if several counters par routers) seems more appropriate than 
Traps. There are some questions you should consider and find an answer 
to: How are configured the time-outs and the retries of your SNMP 
requests (you intend to address some "real" equipment that may respond 
with latency) ? Two seconds time-out

Re: Best practice to get counters from a huge amount of routers.

2016-05-09 Thread Richard Mayers
> Hi,
Hi again, and thanks for the answers. Very appreciated ! I leave the
comments in-line.
>
> Like James,  I  wrote  tools that handle several 10K variables on  5 minute 
> interval.
>
> I am not at all trying to discourage you in your project. There are some 
> concern you should keep in mind:
>
> Please always remember that the primary role of the network / network 
> equipment you try to manage is to transport data.
> I mean payload data, not management data. Have you estimated/calculated the 
> ration of the bandwidth you will consume "just" for management?
> (You did not mention how many counters per routers you intend to collect data 
> about.)
> Measurement should not bias measured (or only to a minimal extend).
Well that should not be a problem, since I have everything simulated
in a sever (using mininet and quagga routers). I have a dedicated out
of band interface at every device just for snmp and netflow. And
currently for snmp I am getting the data from the same machine and
storing it in a file (all the devices share the same file system), so
its kind of "cheating" but as a first step its what they told me to
do. Even with that solution I am having CPU problems due to all these
processes polling the counters and writing it to a file every second.

> Switchs and routers are not designed to assist to this extend, the management 
> station.
> SNMP is not the best method (high CPU load, low priority on the equipment) => 
> How about Netflow ( nfsen is a wonderful free tool , if you accept 5 min. 
> period)
I am already using netflow but for another purpose, and SNMP was only
for the counters to know the load at every link in "real time" ( If I
manage to accomplish that)
>
> There is a big difference between what can be done and what make sense to be 
> done.
>
> In any way Get-bulk (if several counters par routers) seems more appropriate 
> than Traps.
I can have up to ...20 interfaces per routers.
>
> There are some questions you should consider and find an answer to:
>
> How are configured the time-outs and the retries of your SNMP requests (you 
> intend to address some "real" equipment that may respond with latency) ?
> Two seconds time-out and 3 retries don't make really sense when 
> polling every second.
So far I have not consider that, I assume I have some kind of ideal
scenario where everything works... and everything its "under my
control", like my simulation or a data center.

> Impact of a "non-responding" device?  (a faulty one, defectuous one), of 
> several faulty devices (let say 10). What happens to the 190 others?
> What is the latency of the network that interconnect your 200 routers?
The latency should be very small, 1) because I am using the out of
band network to monitor, 2) and my idea is to loadbalance in
datacenter networks.
> How do you "time-stamp" the collected data ?
I don't, I assume that all the data from the routers is from the same
period of "sampling".

I don't really know what to do, I need to know the load per link as
fast as possible so I can improve the load balancing decisions.

Thanks a lot,
Richard

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Best practice to get counters from a huge amount of routers.

2016-05-09 Thread Jurkiewicz Jean-Marc
Hi,

Like James,  I  wrote  tools that handle several 10K variables on  5 minute 
interval.

I am not at all trying to discourage you in your project. There are some 
concern you should keep in mind:

Please always remember that the primary role of the network / network equipment 
you try to manage is to transport data.
I mean payload data, not management data. Have you estimated/calculated the 
ration of the bandwidth you will consume "just" for management?
(You did not mention how many counters per routers you intend to collect data 
about.)
Measurement should not bias measured (or only to a minimal extend).

Switchs and routers are not designed to assist to this extend, the management 
station.
SNMP is not the best method (high CPU load, low priority on the equipment) => 
How about Netflow ( nfsen is a wonderful free tool , if you accept 5 min. 
period)

There is a big difference between what can be done and what make sense to be 
done.

In any way Get-bulk (if several counters par routers) seems more appropriate 
than Traps.

There are some questions you should consider and find an answer to:

How are configured the time-outs and the retries of your SNMP requests (you 
intend to address some "real" equipment that may respond with latency) ?
Two seconds time-out and 3 retries don't make really sense when polling 
every second.
Impact of a "non-responding" device?  (a faulty one, defectuous one), of 
several faulty devices (let say 10). What happens to the 190 others?
What is the latency of the network that interconnect your 200 routers?
How do you "time-stamp" the collected data ?

Good luck with your work.

JM


-Message d'origine-
De : Richard Mayers [mailto:richard.mayer...@gmail.com] 
Envoyé : dimanche, 8. mai 2016 12:11
À : j...@mindspring.com; net-snmp-users@lists.sourceforge.net
Objet : Re: Best practice to get counters from a huge amount of routers.

Hi,

Thanks for the replies.

What about using Traps? Can I make the routers send me the counters every 
second ? Is it hard to set up?

Kind regards,
Richard

2016-05-07 20:56 GMT+02:00 James Leu :
> For my day job we tried  open source packages for SNMP polling
> like:
>
> mrtg
> cricket
>
> They were fine for small numbers and long intervals, but will not 
> scale to your usage.
>
> I  wrote an implementation from scratch that handles 10K variables on 
> 5 minute interval. So it can be done.
>
> Issues I think you will run into:
>
> router CPU:  hitting a device every second for a number of interfaces may 
> consume
> too much CPU time to be practical.
>
> storage IO: if you are successful in retrieving the data, standard DB 
> storage even RRD will not be able to handle the IO load
>
> Things to consider:
>
> Bulk SNMP gets
> RMON
> local device scripting, I believe Cisco routers can do local TCL 
> scripting and junos based devices have local scripting as well.
>
> Directory based queues with small files storing samples
>
> Good luck with your work.
>
> On Sat, May 07, 2016 at 05:20:53PM +0200, Richard Mayers wrote:
>> Hi folks,
>>
>> For my master thesis I am doing a load balancing project and I have 
>> to know the link usage if possible every second. For that I set the 
>> refresh interval to 1 second, so every thing is good so far.
>>
>> My problem is that I am working with big topologies and I may have 
>> 200 or more routers. If I get the counters polling it takes forever I 
>> can not poll the routers one by one, or not even using threads (at 
>> some point it would not scale).
>>
>> What would be the best way to get all the counters ?
>>
>> Since I am simulating everything in a single machine I can do a trick 
>> and write the counters in a file, however that will not be useful 
>> when I test my solution in a real network.
>>
>> Kind regards,
>> Richard
>>
>> -
>> - Find and fix application performance issues faster with 
>> Applications Manager Applications Manager provides deep performance 
>> insights into multiple tiers of your business applications. It 
>> resolves application problems quickly and reduces your MTTR. Get your 
>> free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> ___
>> Net-snmp-users mailing list
>> Net-snmp-users@lists.sourceforge.net
>> Please see the following page to unsubscribe or change other options:
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>
> --
> James R. Leu
> j...@mindspring.com


Re: Best practice to get counters from a huge amount of routers.

2016-05-08 Thread Richard Mayers
Hi,

Thanks for the replies.

What about using Traps? Can I make the routers send me the counters
every second ? Is it hard to set up?

Kind regards,
Richard

2016-05-07 20:56 GMT+02:00 James Leu :
> For my day job we tried  open source packages for SNMP polling
> like:
>
> mrtg
> cricket
>
> They were fine for small numbers and long intervals, but will not scale to
> your usage.
>
> I  wrote an implementation from scratch that handles 10K variables
> on 5 minute interval. So it can be done.
>
> Issues I think you will run into:
>
> router CPU:  hitting a device every second for a number of interfaces may 
> consume
> too much CPU time to be practical.
>
> storage IO: if you are successful in retrieving the data, standard DB storage
> even RRD will not be able to handle the IO load
>
> Things to consider:
>
> Bulk SNMP gets
> RMON
> local device scripting, I believe Cisco routers can do local TCL scripting
> and junos based devices have local scripting as well.
>
> Directory based queues with small files storing samples
>
> Good luck with your work.
>
> On Sat, May 07, 2016 at 05:20:53PM +0200, Richard Mayers wrote:
>> Hi folks,
>>
>> For my master thesis I am doing a load balancing project and I have to
>> know the link usage if possible every second. For that I set the
>> refresh interval to 1 second, so every thing is good so far.
>>
>> My problem is that I am working with big topologies and I may have 200
>> or more routers. If I get the counters polling it takes forever I can
>> not poll the routers one by one, or not even using threads (at some
>> point it would not scale).
>>
>> What would be the best way to get all the counters ?
>>
>> Since I am simulating everything in a single machine I can do a trick
>> and write the counters in a file, however that will not be useful when
>> I test my solution in a real network.
>>
>> Kind regards,
>> Richard
>>
>> --
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers 
>> of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> ___
>> Net-snmp-users mailing list
>> Net-snmp-users@lists.sourceforge.net
>> Please see the following page to unsubscribe or change other options:
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>
> --
> James R. Leu
> j...@mindspring.com

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Developing SNMP agent for a new switch

2016-05-07 Thread Vered Zvi
Hi David,

Your help is highly appreciated.

Thank you very much,
Z.V


From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Friday, May 06, 2016 11:05 AM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Hi Zvika,

Try to run snmpd on your x86 CPU either by installing the Net-SNMP for the 
corresponding operating system or compiling it from the sources.

Configuring Net-SNMP: snmpconf -i

The recommended way to start snmpd is with the following command line:
/usr/sbin/snmpd 
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable

Then, you can see what information it provides with:
$ snmpwalk -v 1 -c public localhost .iso

The traps supported will depend on the supported MIBs. You must configure snmpd 
to send traps, e.g. at the configuration file snmpd.conf. Then you can run 
snmptrapd to get the traps from snmpd.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: viernes, 06 de mayo de 2016 4:50
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: jueves, 05 de mayo de 2016 
11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immedia

Re: Best practice to get counters from a huge amount of routers.

2016-05-07 Thread Ilya Etingof
I’d try to solve that running a poller over asynchronous socket:

http://net-snmp.sourceforge.net/tutorial/tutorial-5/toolkit/asyncapp/asyncapp.c

> On 07 May 2016, at 17:20, Richard Mayers  wrote:
> 
> Hi folks,
> 
> For my master thesis I am doing a load balancing project and I have to
> know the link usage if possible every second. For that I set the
> refresh interval to 1 second, so every thing is good so far.
> 
> My problem is that I am working with big topologies and I may have 200
> or more routers. If I get the counters polling it takes forever I can
> not poll the routers one by one, or not even using threads (at some
> point it would not scale).
> 
> What would be the best way to get all the counters ?
> 
> Since I am simulating everything in a single machine I can do a trick
> and write the counters in a file, however that will not be useful when
> I test my solution in a real network.
> 
> Kind regards,
> Richard


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Best practice to get counters from a huge amount of routers.

2016-05-07 Thread Richard Mayers
Hi folks,

For my master thesis I am doing a load balancing project and I have to
know the link usage if possible every second. For that I set the
refresh interval to 1 second, so every thing is good so far.

My problem is that I am working with big topologies and I may have 200
or more routers. If I get the counters polling it takes forever I can
not poll the routers one by one, or not even using threads (at some
point it would not scale).

What would be the best way to get all the counters ?

Since I am simulating everything in a single machine I can do a trick
and write the counters in a file, however that will not be useful when
I test my solution in a real network.

Kind regards,
Richard

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Developing SNMP agent for a new switch

2016-05-06 Thread Fernández Piñas , David
Hi Zvika,

Try to run snmpd on your x86 CPU either by installing the Net-SNMP for the 
corresponding operating system or compiling it from the sources.

Configuring Net-SNMP: snmpconf -i

The recommended way to start snmpd is with the following command line:
/usr/sbin/snmpd 
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable

Then, you can see what information it provides with:
$ snmpwalk -v 1 -c public localhost .iso

The traps supported will depend on the supported MIBs. You must configure snmpd 
to send traps, e.g. at the configuration file snmpd.conf. Then you can run 
snmptrapd to get the traps from snmpd.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: viernes, 06 de mayo de 2016 4:50
Para: Fernández Piñas, David; net-snmp-users@lists.sourceforge.net
Asunto: RE: Developing SNMP agent for a new switch

Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il] Enviado el: jueves, 05 de mayo de 2016 
11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.

This Email and the attachments were emulated by Check Point ThreatEmulation 
Service.
The information contained in this communication is proprietary to Is

RE: Developing SNMP agent for a new switch

2016-05-05 Thread Vered Zvi
Hi David,

The Intel's switch does not have any MIBs at all.
Intel delivers it without any SNMP features.
There is only an API that can control the switch via an x86 CPU connected to 
the switch via PCIe.

Is it possible to run snmpd without adding any code and just see how it 
responds to SNMP requests ?
I'm aware the reply from snmpd will not contain any valid information.

Does snmpd support SNMP traps ?

Best regards,
Zvika
_
From: Fernández Piñas, David [dfernand...@indra.es]
Sent: Thursday, May 05, 2016 4:46 PM
To: Vered Zvi; net-snmp-users@lists.sourceforge.net
Subject: RE: Developing SNMP agent for a new switch

Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: jueves, 05 de mayo de 2016 11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.

This Email and the attachments were emulated by Check Point ThreatEmulation 
Service.
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_

RE: Developing SNMP agent for a new switch

2016-05-05 Thread Fernández Piñas , David
Do you have the switch MIB to support by the SNMP agent (ASN.1)? If this is a 
private company MIB, I would do a AgentX subagent implementing and getting the 
information from the PCIe device, then the Net-SNMP snmpd will give you some 
standard additional MIBs.

There is plenty of documentation, although not so easy to follow, from my point 
of view, in the Net-SNMP Project website, but after some hours of navigation 
you should be able to find your way.

Best regards,

David

-Mensaje original-
De: Vered Zvi [mailto:ver...@elta.co.il]
Enviado el: jueves, 05 de mayo de 2016 11:31
Para: net-snmp-users@lists.sourceforge.net
Asunto: Developing SNMP agent for a new switch

Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Developing SNMP agent for a new switch

2016-05-05 Thread Vered Zvi
Hello,

I have to develope an SNMP agent for an Intel's switch.

The switch is controlled via an x86 CPU connected to the switch via PCIe.

Is snmpd is a good starting point ?

Is there a manual explains how to develope such agent from scratch ?

Best regards,
Z.V
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


A couple of questions about engineID, oldEngineID and Enterprise ID

2016-03-22 Thread Roy Yang
Hello,

In /etc/snmp/snmpd.conf, I configured by following snmpd.conf.example

engineID "BQTP45000357"

After I started snmpd, saw oldEngineID is generated in /var/lib/net-snmpd
engineBoots 1
oldEngineID 0x80001f88042242515450343530303033353722

Have a couple questions here.
1st question: How is oldEngineID is generated?  Via some reading and
searching, looks:

oldEngineID = Enterprise PEN + 0x04 + engineID.
But here, we see 22 is appended. Looks " is also converted.

2nd question:  How can I change Enterprise PEN(1f88)  to company's
Enterprise PEN.
Should I compile the source code or some configuration can do the trick?

3rd question:  What EngineID I should use for "createUser" directive?
Using engineID("BQTP45000357") seems does not work for snmptrapd.

Thank you in advance,

Roy
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a serious privacy issue with this list

2016-03-19 Thread Alice Wonder
On 03/18/2016 03:38 PM, Alex wrote:
> https://sourceforge.net/p/net-snmp/mailman/net-snmp-users/
>
> Google Groups, Google Products Forums, Lyris, Yahoo Groups and many,
> many other email-based subscription lists do a pretty good job
> obfuscating email addresses and protecting members privacy.
>
> Moving this list to Google Groups would be the easiest solution.

I do not use google groups because I do not like the fact that google 
itself tracks me and everything I do.

Also it is more difficult to validate a message is from the sender. You 
can look at my DKIM signature to verify at least that the message came 
from the SMTP server associated with my sending domain, Google Groups 
does not offer that kind of validation.

Google likes to give the illusion of privacy while they have a profit 
model designed on tracking every aspect of your life.

Don't fall for it.


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a serious privacy issue with this list

2016-03-19 Thread Alex
Michael,

*I asked that my email address is kept private*, not whether this request
has merits. If you'd like to discuss the merits, please post a new thread.

Thank you for your consideration. :)

A.

On Fri, Mar 18, 2016 at 2:58 PM, Michael Schwartzkopff  wrote:

>
> you are talking about privacy and have an email account at google. You
> must be
> joking.
>
> But seriously, spam protection is done on your mail server, not by
> obscurity
> trying to hide your mail address. Tune your mail server and you will not
> have
> problems with spam.
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How to forward the received traps to a different port on the same host

2016-03-19 Thread andrewarnier
 

I am currently attempting to configure snmptrapd to do trap forwarding.With
my current configuration, snmptrapd is receiving and logging incoming traps,
but it it does not appear to be forwarding them to a different port on the
same host. The contents of my snmptrapd.conf file are as follows:

disableAuthorization yes

traphandle default  /usr/sbin/snmptthandler

authCommunity log public

forward default 127.0.0.1:1062 

When I run snmptrapd as follows:

snmptrapd -f -Le -d

I can see traps being received as follow result,

Received 67 byte packet from UDP: [191.50.2.21]49801->[191.50.3.75]:162

: 30 41 02 01  00 04 08 54  4E 50 49 47  50 29 2A A40A.USPIGP)*.

0016: 32 06 08 2B  06 01 06 03  01 01 05 40  04 C0 A8 062..+...@

0032: 0C 02 01 04  02 01 00 43  04 3D F3 FC  72 30 14 30...C.=..r0.0

0048: 12 06 0A 2B  06 01 04 01  09 02 01 05  00 40 04 B9...+.@..

0064: 5E 6F 01  

 

When I send a test trap from localhost,

Sending 96 bytes to UDP: [127.0.0.1]:1062->[0.0.0.0]:0

: 30 5E 02 01  00 04 06 70  75 62 6C 69  63 A4 51 060^.public.Q.

0016: 09 2B 06 01  06 03 01 01  05 05 40 04  7F 00 00 01.+@.

0032: 02 01 06 02  01 11 43 04  02 12 FA 93  30 32 30 30..C.0200

0048: 06 09 2B 06  01 06 03 01  01 05 05 04  23 4A 75 73..+.#Jus

0064: 74 20 61 20  74 65 73 74  2E 2E 2E 62  6C 61 62 6C    t a test...blabl

0080: 61 62 6C 61  62 6C 2E 2E  2E 2E 2E 2E  2E 2E 2E 2Eablabl..

 

I would appreciate any assistance with further debugging and ultimately
addressing this issue.

Thank you.

Andrew

 

 

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


net-snmp as a service?

2016-03-19 Thread Alex
Installing Net-SNMP from a standard Cent-OS repository places files in
/etc/snmp/ folder, registers it as a service and probably does some other
things.

Are there instructions on how to do the same if I build it myself using
net-snmp.org sources?

Thanks!

Alex.
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


a serious privacy issue with this list

2016-03-19 Thread Alex
Going to the list home page, I can pretty much see my - and many others' -
email addresses. The page fully exposes the first part of it with "gm" for
the domain - which basically everyone on the net and their dog can figure
out, is "gmail". No wonder I started getting a lot more spam than I used
to.

This means this list fully exposes members' email addresses with easily
guessable domains like gmail, outlook, yahoo, etc.

Should that change, like, yesterday?

A.
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a serious privacy issue with this list

2016-03-18 Thread Alice Wonder
On 03/18/2016 03:33 PM, Alex wrote:
> Michael,
>
> *I asked that my email address is kept private*, not whether this
> request has merits. If you'd like to discuss the merits, please post a
> new thread.
>
> Thank you for your consideration. :)

When you post to a public list your e-mail address us no longer private.

What many people do is create an e-mail address specific for posting to 
lists. Then anything sent to that address that is not related to a list 
can be safely deleted.


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a serious privacy issue with this list

2016-03-18 Thread Alex
https://sourceforge.net/p/net-snmp/mailman/net-snmp-users/

Google Groups, Google Products Forums, Lyris, Yahoo Groups and many, many
other email-based subscription lists do a pretty good job obfuscating email
addresses and protecting members privacy.

Moving this list to Google Groups would be the easiest solution.

A.

On Fri, Mar 18, 2016 at 3:33 PM, Wes Hardaker  wrote:

> Alex  writes:
>
> Can you tell where where you're talking about?  The subscriber list is
> private.  Do you mean the archives for the list?  If that's the case,
> you're writing to a public mailing list that anyone can subscribe to
> (including spammers), so I'm not sure how you can expect your address to
> be hidden in general.
> --
> Wes Hardaker
> Parsons
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp as a service?

2016-03-18 Thread Alex
Thank you - and sorry, I was asking if instructions where available. E.g.
which exact buttons to push to replicate the process performed by the
standard repository.


On Fri, Mar 18, 2016 at 3:33 PM, Wes Hardaker  wrote:

>
> If you build it yourself, you can find a service file you can modify to
> taste in dist/snmpd.services
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a serious privacy issue with this list

2016-03-18 Thread Michael Schwartzkopff
Am Freitag, 18. März 2016, 14:40:24 schrieb Alex:
> Going to the list home page, I can pretty much see my - and many others' -
> email addresses. The page fully exposes the first part of it with "gm" for
> the domain - which basically everyone on the net and their dog can figure
> out, is "gmail". No wonder I started getting a lot more spam than I used
> to.
> 
> This means this list fully exposes members' email addresses with easily
> guessable domains like gmail, outlook, yahoo, etc.
> 
> Should that change, like, yesterday?
> 
> A.

Hi,

you are talking about privacy and have an email account at google. You must be 
joking.

But seriously, spam protection is done on your mail server, not by obscurity 
trying to hide your mail address. Tune your mail server and you will not have 
problems with spam.

Mit freundlichen Grüßen,

Michael Schwartzkopff

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64, +49 (162) 165 0044
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein

signature.asc
Description: This is a digitally signed message part.
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Retriving data from a batch file.

2016-03-01 Thread Mark Roles
I Have made many DOS batch jobs to set and retrieve data with, but when I use 
the snmpGet command it only displays the output onto my command terminal 
window. How does one capture that out put, place into a DOS BATCH variable that 
I then can use to manipulate or export that data to?



Here is a normal DOS snmpGet command that I would use



snmpGet -v1 -c AlphaGet 192.168.1.34  1.3.6.1.4.1.926.1.64.1.1.2.0



thanks, Mark
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How do I deregister a handler/scalar in my subagent?

2016-02-23 Thread Peter Spierenburg
Greetings,


We have written a subagent based on snmpd_5.4.3-dfsg-2+squeeze1_xxx.deb on both 
i386 and armel systems.


We are having a problem that appears to be caused by the order in which we 
register handlers using:

netsnmp_handler_registration* reginfo =
netsnmp_create_handler_registration(name,
generic_snmp_access_method,
(oid*)snmpOid.getOid(),
snmpOid.getLength(),
accessLevel);
reginfo->handler->myvoid = NULL;
netsnmp_register_scalar(reginfo);

If the order of calls is wrong, then we cannot snmpwalk the entire tree. We 
believe that there may be a bug in 5.4.3 that doesn't properly track the 
correct MODE_GETNEXT entry. We do not experience the issue on 5.7.2 for example.

The trouble is that we do not know apriori which handlers will be available at 
runtime, so we register them only as they become available.

Our hope is to work around the issue by keeping track of which handlers are 
available and then deregistering and reregistering handlers as necessary so 
that we can ensure that we can walk the entire tree.

What I need to know is the names of the functions that I can use to reverse 
netsnmp_register_scalar(), and netsnmp_create_handler_registration()? A 
netsnmp_deregister_scalar() and netsnmp_destroy_handler_registration() if you 
will.

Peter.





--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: What is the best way to detect a re-configured router?

2016-01-19 Thread Mathias Wegner

On Jan 18, 2016, at 16:26, Bob Albrecht  wrote:

> Changing router firmware can take a long time. It's faster to pull the "route 
> processor"/supervisor card and replace it with one that's already upgraded. 
> The new card will have the same config, including engineID. However, counters 
> such as engineBoots and engineTime will be reset. 
> 
> 
> We see same engineID come up but with fewer engineBoots or lower engineTime, 
> there is a security discrepancy that must be addressed. 
> 
> What is the authoritative way to detect this situation?



I don’t know about an authoritative, but if the uptime has reset at the same 
time that boots and time changed, that’s a pretty solid indicator that 
something like this has happened.


Mathias 
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: What is the best way to detect a re-configured router?

2016-01-18 Thread Lee
On 1/18/16, Bob Albrecht  wrote:

> Changing router firmware can take a long time. It's faster to pull the
> "route processor"/supervisor card and replace it with one that's already
> upgraded. The new card will have the same config, including engineID.
> However, counters such as engineBoots and engineTime will be reset.
>
> We see same engineID come up but with fewer engineBoots or lower
> engineTime, there is a security discrepancy that must be addressed.
>
> What is the authoritative way to detect this situation?

Keep track of the serial numbers on the various bits of hardware in the box.

I like RANCID - even if the config doesn't change you still get an
email showing the serial number / firmware version / software version
changes on the line cards.
  (note that "supervisor card" is a subset of "line card" :)

Regards,
Lee

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


What is the best way to detect a re-configured router?

2016-01-18 Thread Bob Albrecht
Changing router firmware can take a long time. It's faster to pull the
"route processor"/supervisor card and replace it with one that's already
upgraded. The new card will have the same config, including engineID.
However, counters such as engineBoots and engineTime will be reset.


We see same engineID come up but with fewer engineBoots or lower
engineTime, there is a security discrepancy that must be addressed.

What is the authoritative way to detect this situation?

-- 
Bob Albrecht
SevOne
550 South College Avenue
Wilmington, DE 19808
434-249-1747

-- 
 
--

SevOne, Inc. reserves the right to monitor the transmission of this message 
and to take corrective action against any misuse or abuse of its e-mail 
system or other components of its network.

The information contained in this e-mail may be confidential and/or legally 
privileged. It is intended solely for the addressee.  If the reader of this 
message is not an intended recipient, you are hereby notified that any 
unauthorized review, use, disclosure, dissemination, distribution, or 
copying of this communication, or any of its contents, is strictly 
prohibited and may be unlawful. If you have received this communication in 
error, please reply to the sender and destroy all copies of the message. 
 To contact us directly, send to postmas...@sevone.com. 
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Setting a stored image in memory

2015-11-04 Thread Diego Muñoz
Hello everyone,

Less than one week ago I was asked to work on a project with NTCIP devices.
The first thing that I need to do is to change an image to show the
"suggested max speed" on the device.

Currently, I can change the images only in a very hacky way: I was given a
Hex string, which I send using to the device using UDP,  where I can switch
the image ID and the time the device will show the image. I got this hex
from the person who built the device, and he does not know how this hex was
generated.

I have the NTCIP 1203 MIB file, and I tried to snmpget every MIB
definition, and I got a result != null 5 times approx.

The available info I have is:
1. This hex string
2. NTCIP 1203 MIB file.
3. I know the device has images stored somewhere.

I would really appreciate if you could give me any guide to find out how to
snmpset the image, because at this moment I am absolutely lost.

Regards,
Diego
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: how can I handle a Counter32 MIB?

2015-08-25 Thread jregovic
 
Have you tried ASN_COUNTER?
- Original Message - Subject: how can I handle a Counter32 MIB?
From: "Mostafa Salari" 
Date: 8/25/15 9:59 am
To: net-snmp-users@lists.sourceforge.net

  Hello,
In a subagent, when I want to update the value of an (for example) INTEGER mib, 
I use the following line in Netsnmp_Node_Handler * myhandler(...):
  snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER, v->value, 
sizeof(long));
  
HOW can I update the value of a Counter32 mib? In other word: what should I put 
instead of ASN_INTEGER?
 
I cant find the appropriate definition in "asn.h"
Thanks,
Mostafa

-- 
___ Net-snmp-users mailing list 
Net-snmp-users@lists.sourceforge.net Please see the following page to 
unsubscribe or change other options: 
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


how can I handle a Counter32 MIB?

2015-08-25 Thread Mostafa Salari
Hello,
In a subagent, when I want to update the value of an (for example) INTEGER
mib, I use the following line in Netsnmp_Node_Handler * myhandler(...):
  snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
v->value, sizeof(long));

HOW can I update the value of a Counter32 mib? In other word: what should I
put instead of ASN_INTEGER?

I cant find the appropriate definition in "asn.h"
Thanks,
Mostafa
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a question aboat: Mibs structure

2015-08-23 Thread Fulko Hew
On Sun, Aug 23, 2015 at 3:02 AM, Mostafa Salari  wrote:

> Hello
> When I execute [snmpwalk -c public -v1 localhost -On] in my Ubuntu shell
> (on vm ware) I see an OID such as:
> .1.3.6.1.2.1.28.0 which has a Counter32 value and is translated
> to: SNMPv2-MIB::snmpOutGetResponses.0
>
> here: { http://www.oid-info.com/cgi-bin/ } wa can search an OID and view
> the description.
> So, I can search 1.3.6.1.2.1.28 and view the result, but 1.3.6.1.2.1.28.0
> gets no result.
> I want to ask you: What is the meaning of ".0" at the tail of the OID?
>

An 'instance' of an OID is referenced by its base OID and the index of the
specific instance.
so the .0 is the index part.  Indexes may be complex, when refereing to
instances inside
rows of a table; or in this case a .0 is (and implies) a single scalar
variable.
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


a question aboat: Mibs structure

2015-08-23 Thread Mostafa Salari
Hello
When I execute [snmpwalk -c public -v1 localhost -On] in my Ubuntu shell
(on vm ware) I see an OID such as:
.1.3.6.1.2.1.28.0 which has a Counter32 value and is translated
to: SNMPv2-MIB::snmpOutGetResponses.0

here: { http://www.oid-info.com/cgi-bin/ } wa can search an OID and view
the description.
So, I can search 1.3.6.1.2.1.28 and view the result, but 1.3.6.1.2.1.28.0
gets no result.
I want to ask you: What is the meaning of ".0" at the tail of the OID?
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


question: writing a sub agent

2015-08-20 Thread Mostafa Salari
Hello,
I want to write a subagent that handles a number of MIBs.

So a function in my subagent should be called by snmpd, when that MIBs are
requested.

1. WHAT IS THAT FUNCTION?

Another little question:
2. What Does [agent_check_and_process(1);] function do? Is it necessary to
be in the main loop of my subagent?

Thank you very much for your good support
Best regards,
Mustafa
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Q: How to remove a table row?

2015-08-19 Thread Ulrich Windl
Hi!

I found the example on how to add a SNMP table row in a subagent, but I wonder 
how to dynamically remove a row, assuming you have the index or some primary 
key inside a table row (but not the pointer to the row).

what I guessed so far (the documentation is _really_ bad) is this:

netsnmp_table_row   *rowp = netsnmp_table_data_get(table_set, ?);
netsnmp_table_dataset_remove_row(table_set, rowp);

That would logically remove the row from the table, but probably not delete the 
row itself.

So what to fill in at "?" (how to get it)? And if you decode to remove the row 
how do I complete the operation.

Maybe it would be easiest to complete the example "data_set.c" with removing of 
a row.

Despite of that if you already have some data structure that contains 
everything you need for the table rows, how would a corresponding code template 
look like?

Regards,
Ulrich



--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Antw: register e.g. a STRING MIB

2015-08-18 Thread Ulrich Windl
>>> Mostafa Salari  schrieb am 18.08.2015 um 13:15 in 
>>> Nachricht
:
> In a subagent, I can register (for example) Counter32 MIBs with the
> following function:
> netsnmp_register_read_only_counter32_instance(...)
> 
> So, how can I register (for example) STRING or TimeTick MIBs.

I don't have an answer, but I have a related question: When values are passed 
by reference, how long do the actual values be valid? I.e.: Does registering 
make copies of the referenced values (as some conversion is needed anyway)?

> 
> I did'nt find a suitable function here:
> http://www.net-snmp.org/docs/man/netsnmp_instance.html#lbAG 
> 
> please help.
> 
> thanks





--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


register e.g. a STRING MIB

2015-08-18 Thread Mostafa Salari
In a subagent, I can register (for example) Counter32 MIBs with the
following function:
netsnmp_register_read_only_counter32_instance(...)

So, how can I register (for example) STRING or TimeTick MIBs.

I did'nt find a suitable function here:
http://www.net-snmp.org/docs/man/netsnmp_instance.html#lbAG

please help.

thanks
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Another question for: "Writing a Subagent

2015-08-16 Thread Robson, Alan
How come your subagent can’t wait for a request to come in from the manager and 
check the file at that time ? For example, if the file contains data upon which 
the response is based, subagent waits for the poll, then opens the file, 
calculates and sends the response.

Or are you trying to keep track of changes in the file between polls from the 
manager ? What utility is there in opening the file if the manager is not 
asking for a response ?

Cheers

Alan

From: Mostafa Salari [mailto:msg...@gmail.com]
Sent: Saturday, August 15, 2015 11:40 PM
To: net-snmp-users@lists.sourceforge.net
Subject: Another question for: "Writing a Subagent

Hello,
I want to write a subagent that updates the values of some MIBs from a text 
file (Some other function fill the file).
I am altering the following tutorial code to reach my goal:
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demon/example-demon.c<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.net-2Dsnmp.org_tutorial_tutorial-2D5_toolkit_demon_example-2Ddemon.c&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=mvQodtBRPkqKiBNDPH-P1rnsRbjvA4cmQ_qQSDS7yQ0&s=p6CsWa4_dbjm-G4-CqitiPdIIw_wEpye98bpgRhZlUU&e=>

So my subagent can check the file every (for example) 5 seconds, then call a 
function that updates the OID values.
1. WHAT IS THAT UPDATE FUNCTION? I used
2. WHERE SHOULD I PLACE THIS CHECKING CODE? Is the main loop 
while(keep_running){...} in the above link suitable?
3. WHAT DOES [agent_check_and_process(1);] LINE DO IN THE MAIN LOOP?
4. IS THERE ANOTHER WAY TO UPDATE SOME MIBS ITERATIVELY?
Thank you very much for your good support
Best regards,
Mustafa
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Another question for: "Writing a Subagent

2015-08-15 Thread Mostafa Salari
Hello,
I want to write a subagent that updates the values of some MIBs from a text
file (Some other function fill the file).

I am altering the following tutorial code to reach my goal:
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demon/example-demon.c

So my subagent can check the file every (for example) 5 seconds, then call
a function that updates the OID values.
1. WHAT IS THAT UPDATE FUNCTION? I used
2. WHERE SHOULD I PLACE THIS CHECKING CODE? Is the main loop
*while(keep_running){...}* in the above link suitable?
3. WHAT DOES [agent_check_and_process(1);] LINE DO IN THE MAIN LOOP?
4. IS THERE ANOTHER WAY TO UPDATE SOME MIBS ITERATIVELY?

Thank you very much for your good support
Best regards,
Mustafa
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a question aboat "Writing a Subagent

2015-08-15 Thread shubham soni
By default netsnmp agent try to connect to master agentx on default
configuration that is default socket for connection is unix  socket and
that's why following error comes
"Warning: Failed to connect to the agentx master agent ([NIL]):"

Here NIL represent default unix  socket.

Solution :
Either configure agent configuration (example.conf) for connection at
tcp:localhost:1705, snmpd.conf is for SNMP demon for listen at that port (
must be there also)

Or add the following line in your example demon :
netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,NETSNMP_DS_AGENT_X_SOCKET,
"tcp:localhost:1705");

Hope this can help you .
On Aug 15, 2015 8:45 PM, "Mostafa Salari"  wrote:

> REALLY SORRY I PRESSED Ctrl+Enter AND NOT COMPLETED EMAIL HAS BEEN SENT
>
> Hello,
> I'm new to net-snmp agent. I am trying to do "Writing a Sub agent"
> tutorial as described in the following link:
>
> http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent#Test_object_with_subagent
>
> I was successfull to compile and run my own agentx subagent using net-snmp
> --compile-subagent ... as described in the tutorial.
>
> I wrote a sub agent that reads any number of OIDs and Values from a text
> file and registers them via "netsnmp_register_long_instance" function. It
> works! but if the textfile changed the sub agennt must be killed and
> executed again so that snmpwalk shows the new values. SO: I want to write a
> sub agent that read the textfile repeatedly (for example every 5 secs).
>
> It would be thankful if you can help me.
>
> Best regards,
> thanks,
> Mustafa
>
>
> Appendix:
> I thought that maybe "Instrumenting your own code with agentx subagent
> support" topic in the above link can help me to write such a sub agent! So
> I tried to do the tutorial. But I cant get answere from "exemple-demon"
>
> The [make example-demon] command is successful, next I execute 
> [*./example-demon
> &*] to sun the sub agent. but the "Warning: Failed to connect to the
> agentx master agent ([NIL]):" message is shown repeatedly after
> executation. Note thet I run snmpd with the following configuration
> before running example-demon:
> "
> #com2sec paranoid  default public
> com2sec readonly  default public
> com2sec readwrite default private
> rocommunity public
> rwcommunity private
>  group MyROGroup v1 readonly
> view all included .1 80
> access MyROGroup "" any noauth exact all none none
> master agentx
> agentXSocket tcp:localhost:1705
> "
>
> Also the command [snmpget -c public -v1 localhost
> NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0] says that:
> "Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0"
>
> while I copied NET-SNMP-TUTORIAL-MIB.txt file in
> "/usr/local/share/snmp/mibs" directory and I append the file name to the
> end of "/var/net-snmp/mib_indexes/0" file!
>
> WHAT CAN I DO?
> THANKS.
>
>
> --
>
> ___
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a question aboat "Writing a Subagent

2015-08-15 Thread Mostafa Salari
REALLY SORRY I PRESSED Ctrl+Enter AND NOT COMPLETED EMAIL HAS BEEN SENT

Hello,
I'm new to net-snmp agent. I am trying to do "Writing a Sub agent" tutorial
as described in the following link:
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent#Test_object_with_subagent

I was successfull to compile and run my own agentx subagent using net-snmp
--compile-subagent ... as described in the tutorial.

I wrote a sub agent that reads any number of OIDs and Values from a text
file and registers them via "netsnmp_register_long_instance" function. It
works! but if the textfile changed the sub agennt must be killed and
executed again so that snmpwalk shows the new values. SO: I want to write a
sub agent that read the textfile repeatedly (for example every 5 secs).

It would be thankful if you can help me.

Best regards,
thanks,
Mustafa


Appendix:
I thought that maybe "Instrumenting your own code with agentx subagent
support" topic in the above link can help me to write such a sub agent! So
I tried to do the tutorial. But I cant get answere from "exemple-demon"

The [make example-demon] command is successful, next I execute
[*./example-demon
&*] to sun the sub agent. but the "Warning: Failed to connect to the agentx
master agent ([NIL]):" message is shown repeatedly after executation. Note
thet I run snmpd with the following configuration before running
example-demon:
"
#com2sec paranoid  default public
com2sec readonly  default public
com2sec readwrite default private
rocommunity public
rwcommunity private
 group MyROGroup v1 readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
master agentx
agentXSocket tcp:localhost:1705
"

Also the command [snmpget -c public -v1 localhost
NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0] says that:
"Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0"

while I copied NET-SNMP-TUTORIAL-MIB.txt file in
"/usr/local/share/snmp/mibs" directory and I append the file name to the
end of "/var/net-snmp/mib_indexes/0" file!

WHAT CAN I DO?
THANKS.
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


a question aboat "Writing a Subagent

2015-08-15 Thread Mostafa Salari
Hello,
I'm new to net-snmp agent. I am trying to do "Writing a Sub agent" tutorial
as described in the following link:
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent#Test_object_with_subagent

I was successfull to compile and run my own agentx subagent using net-snmp
--compile-subagent ... as described in the tutorial.

I wrote a sub agent that reads any number of OIDs and Values from a text
file and registers them via "netsnmp_register_long_
instance" function. It works! but if the textfile changed the sub agennt
must be killed and executed again so that snmpwalk shows the new values.
SO: I want to write a sub agent that read the textfile repeatedly (for
example every 5 secs). I thought that
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Anyone know of a trap receiver that supports SnmpAdminString with UTF-8 character encoding?

2015-07-15 Thread Robert Story
On Thu, 25 Jun 2015 14:58:36 + Christopher wrote:
CC> I have tried many receivers
CC> (snmptrapd,ManageEngine,iReasoning,Wireshark), and they all
CC> display SnmpAdminString types as ascii characters, even though
CC> the SNMP-FRAMEWORK mib has a DISPLAY-HINT of "255t" for
CC> SnmpAdminString.
CC> 
CC> For example:
CC> 
CC> Sending the string "IQTV-ö05"
CC> 
CC> The correct UTF-8 bytes are sent over the wire
CC> 495154562dc3b63035
CC> 
CC> But each receiver displays this as "IQTV-ö05"
CC> 
CC> (The bytes 0xc3b6 in UTF-8 represent 'ö' but in extended ascii
CC> are 'ö').

Ugh. I just spent too much time reading about UTF-8 printing. I've
created a bug report for this issue
(https://sourceforge.net/p/net-snmp/bugs/2655/). I might be missing
something, but unfortunately it doesn't look like there is a
simple/quick fix.

Robert

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Anyone know of a trap receiver that supports SnmpAdminString with UTF-8 character encoding?

2015-06-25 Thread Christopher Crotty
I have tried many receivers (snmptrapd,ManageEngine,iReasoning,Wireshark), and 
they all display SnmpAdminString types as ascii characters, even though the 
SNMP-FRAMEWORK mib has a DISPLAY-HINT of "255t" for SnmpAdminString.

For example:

Sending the string "IQTV-ö05"

The correct UTF-8 bytes are sent over the wire  495154562dc3b63035



But each receiver displays this as "IQTV-ö05"

(The bytes 0xc3b6 in UTF-8 represent 'ö' but in extended ascii are 'ö').


Thanks for your time:

Chris

Christopher Crotty
Senior Principal Engineer
IneoQuest Technologies, Inc.
- - - - - - - - - - - - - - - - - - - - - -
Office: 508.618.0305
Mobile: 617.320.3884
Fax: 508.339.4727
- - - - - - - - - - - - - - - - - - - - - -
170 Forbes Blvd,
Mansfield, MA 02048 USA

Global Leader in Video Service Assurance
www.ineoquest.com




NOTICE: This communication and any attachments may contain confidential and/or 
privileged information of IneoQuest Technologies, Inc. ("IneoQuest"). This 
communication is intended solely for the use of the individual or entity to 
which it is addressed. If you are not the intended recipient of this 
communication, you are hereby notified that any dissemination, distribution, 
copying or other use of this communication or the information it contains is 
strictly prohibited and may be unlawful. If you have received this 
communication in error, please notify the sender immediately by reply e-mail 
and destroy all copies of this communication (including attachments), 
electronic or otherwise. If you are a party to a written Non-Disclosure 
Agreement ("NDA") with IneoQuest, you should maintain the contents of this 
communication (including attachments) in confidence to the full extent 
specified in the NDA.
--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


A mistake at the Man pages about SNMPNETSTAT command

2015-04-28 Thread 高杨
this is the url
http://www.net-snmp.org/docs/man/snmpnetstat.html 


it should be "-Cp", isn't it?

C:\Users\Administrator>snmpnetstat -v 2c -c public -CP tcp 192.168.1.105
usage: snmpnetstat [snmp_opts] [-Can] [-Cf address_family]
   snmpnetstat [snmp_opts] [-CbdgimnrSs] [-Cf address_family]
   snmpnetstat [snmp_opts] [-Cbdn] [-CI interface] [-Cw wait]
   snmpnetstat [snmp_opts] [-Cs] [-Cp protocol]
   snmpnetstat [snmp_opts] [-Ca] [-Cf address_family] [-Ci | -CI interface]




gaoyangl...@outlook.com
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


You have a new notification from nikhi.karn...@gmail.com. View??

2015-03-19 Thread nikhi . karnati
Hi,

nikhi.karn...@gmail.com wants to follow you.

** Is nikhi.karn...@gmail.com you friend? **
If Yes please follow the link below:
http://invites.flipmailer.com/signup_e.html?fullname=&email=net-snmp-users@lists.sourceforge.net&invitername=nikhi.karnati&inviterid=37195221&userid=15996751&token=d4a9e0bbd2aafc61ed5a142d8e676bd&ts=1426486011154&emailmasterid=75495cc9-236b-4333-b0b1-802654d964da&from=nikhi.karn...@gmail.com&template=invite_reminder_a&src=txt_yes

If No please follow the link below:
http://invites.flipmailer.com/signup_e.html?fullname=&email=net-snmp-users@lists.sourceforge.net&invitername=nikhi.karnati&inviterid=37195221&userid=15996751&token=d4a9e0bbd2aafc61ed5a142d8e676bd&ts=1426486011154&emailmasterid=75495cc9-236b-4333-b0b1-802654d964da&from=nikhi.karn...@gmail.com&template=invite_reminder_a&src=txt_no


Follow the link below to remove yourself from all such emails
http://invites.flipmailer.com/uns_inviter.jsp?email=net-snmp-users@lists.sourceforge.net&iid=75495cc9-236b-4333-b0b1-802654d964da&from=nikhi.karn...@gmail.com


--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


  1   2   3   4   5   6   7   8   9   10   >