LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Snmp / Cfgmaker problem (https://www.linuxquestions.org/questions/linux-networking-3/snmp-cfgmaker-problem-4175582360/)

thomazp 06-15-2016 02:54 PM

Snmp / Cfgmaker problem
 
# cfgmaker netcomro@172.27.252.3
SNMP Error:
no response received
SNMPv1_Session (remote host: "172.27.252.3" [172.27.252.3].161)
community: "netcomro"
request ID: 2076299575
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib64/mrtg2/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.1 on netcomro@172.27.252.3::::::v4only
at /usr/bin/cfgmaker line 950
WARNING: Skipping netcomro@172.27.252.3: as no info could be retrieved

I saw a snmp service(snmptrapd) down. I put it up and the result was the same. ;-(

Habitual 06-16-2016 08:06 AM

Code:

telnet 172.27.252.3 161
Traps it seems use port 162

http://catb.org/~esr/faqs/smart-questions.html

thomazp 06-16-2016 08:37 AM

Here we Can't use telnet, I tried ssh onstead and seemed working.

thomazp 06-16-2016 09:17 AM

I ask to see if The router is accepting both 161 and 162 , also along the route.
They will do it afternoon today and I post the results here.
Tks

Habitual 06-16-2016 10:20 AM

nc ?

thomazp 06-16-2016 10:25 AM

Didn't understand what it means.

Habitual 06-16-2016 10:49 AM

netcat # since there's no telnet client.
https://www.digitalocean.com/communi...tions-on-a-vps

Code:

nc -z 172.27.252.3 161

Habitual 06-16-2016 10:54 AM

How was this cfgmaker installed exactly?
What OS and build is this on?
What version of snmpd?

Can you snmpwalk manually to 172.27.252.3 for the 1.3.6.1.2.1.1 OID?
version 2 I suspect.

thomazp 06-16-2016 11:23 AM

The log isn't enabled.
Comes an error: No security name specified.

Habitual 06-16-2016 11:31 AM

Show us the command used please.

thomazp 06-16-2016 11:37 AM

Two tries:
snmpwalk 172.27.252.3 1.3.6.1.2.1.1
No log handling enabled - turning on stderr logging
snmpwalk: No securityName specified
And
snmpwalk 172.27.252.3
Same result

I had used the second to test SNMP connection in the past.

Habitual 06-16-2016 12:17 PM

Is the snmpd.conf on 172.27.252.3 configured for access ?\

Maybe it's time I ask you what you are trying to achieve.
What is the goal?

You're using snmpwalk incorrectly:
Example:
Code:

snmpwalk -v 2c -c mysecretsnmp 172.27.252.3 1.3.6.1.2.1.1
So I refer you to http://www.net-snmp.org/

So, on 172.27.252.3 you'll need to configure the "community" (you used "netcomro" earlier?)
and what they'll have access to.

Lots of examples on the web:
https://duckduckgo.com/?q=snmp+walk+...e+linux&ia=web

thomazp 06-16-2016 12:20 PM

I asked them to verify for me, they will answer this afternoon.
Is there any way to test and tell them the problem is there ?

Habitual 06-16-2016 12:26 PM

Quote:

Originally Posted by thomazp (Post 5561977)
I asked them to verify for me, they will answer this afternoon.
Is there any way to test and tell them the problem is there ?

Test what?
I have only your improper use of the snmpwalk command.
Edited: See above^

Also:
You didn't answer:
http://www.linuxquestions.org/questi...0/#post5561920

So, I'm waiting on that before I invest too much more time.
Make certain ports 161 and 162 are open on the snmp host being queried and the client machine doing the query.

thomazp 06-16-2016 12:30 PM

I don't have NC command.
The Community is correct.

thomazp 06-16-2016 12:47 PM

Test the two ways (not ports) .
I've used the snmpwalk command this way in the past to test the snmp connection.

Habitual 06-16-2016 01:17 PM

Quote:

Originally Posted by thomazp (Post 5561992)
Test the two ports .
I've used the snmpwalk command this way in the past to test the snmp connection.

That's fine. But you still aren't answering my questions.
I will not help you any further. Good Luck.

thomazp 06-16-2016 01:20 PM

Which questions?
I thought I had answered all you asked, didn't I ?

Habitual 06-16-2016 02:01 PM

The first three in http://www.linuxquestions.org/questi...0/#post5561920 ?
Skip the snmpwalk Question.

Answer or not.
Maybe it doesn't matter.
Maybe I'm just cranky, or irritable today.
I don't know.

Nothing personal, I just like actionable facts instead of the "Nerd Jeopardy" with back and forth 100 questions.
Our time here is valuable.
Our experience is invaluable.
So if asking for help, be prepared to be questioned. There is usually no "one-size-fits-all" answer.
This is true all over the web. Queries for help are usually replied to with "gimme the facts" if they were'n't supplied.
Never say never.

Here's some things to consider at http://catb.org/~esr/faqs/smart-questions.html

Have a great day!

Someone else will be along to help.

thomazp 06-16-2016 02:07 PM

Look this:
#snmpwalk -OS -c netcomro -v 1 172.27.252.3
Timeout: No Response from 172.27.252.3
Can I say the Snmp connection is blocked in the way ?

thomazp 06-16-2016 02:16 PM

Sorry,
The info you asked:
OS is Red Hat Enterprise 16, 64 bits(Intel based)
The MRTG was installed using yum command.
Is that you asked ?

thomazp 06-17-2016 12:52 PM

The command used:
#snmpwalk -OS -c netcomro -v 172.27.252.3
The response:
Timeout: No response from <address above>
What do you think ?

thomazp 06-20-2016 11:27 AM

I asked about The router SNMP Connection.
The device isn't accepting The connection, they told me to wait they are going to verify this. I put when Have News. Tks

thomazp 06-20-2016 03:10 PM

Is another way to Ensure The router isn't accepting snmp connections ? I am sure of this, but I need to show it to network profissional here.
Tks

Habitual 06-20-2016 04:44 PM

Code:

telnet <host> 161

thomazp 06-20-2016 05:20 PM

I will do it tomorrow.
Post the results here.
Thanks

Habitual 06-20-2016 06:09 PM

The only result necessary is a successful connection.

thomazp 06-21-2016 04:17 AM

I remembered this night:
There, we can't use telnet , only SSH.
Is it possible SSH <host> port ?
I saw after you sent, SNMP uses ports 161 and 162. Is that correct?
Tks

Habitual 06-21-2016 07:54 AM

Quote:

Originally Posted by thomazp (Post 5564023)
I remembered this night:
There, we can't use telnet , only SSH.
Is it possible SSH <host> port ?
I saw after you sent, SNMP uses ports 161 and 162. Is that correct?
Tks

You can try
Code:

ssh <host> -p 161

thomazp 06-21-2016 08:11 AM

root@li1964 ~]# ssh -p 161 172.27.252.3
ssh: connect to host 172.27.252.3 port 161: Connection refused
[root@li1964 ~]# ssh -p 162 172.27.252.3
ssh: connect to host 172.27.252.3 port 162: Connection refused

The device really isn't accepting SNMP connections.
I asked to correct this to allow this monitoring.
Thanks

thomazp 06-21-2016 08:45 AM

I did your suggestion:
Look below:
[root@li1964 ~]# ssh -p 161 172.27.252.3
ssh: connect to host 172.27.252.3 port 161: Connection refused
[root@li1964 ~]# ssh -p 162 172.27.252.3
ssh: connect to host 172.27.252.3 port 162: Connection refused
Now I am waiting The network admin solves this to continue testing this environment.
Tks again

thomazp 06-21-2016 02:59 PM

The two ports are rejecting connections.
I asked to solve it to continue using mrtg.
Thanks

thomazp 06-21-2016 03:09 PM

I tested SSH -p <port> <host> using the two ports and the desired host.
Both rejected, and I send the evidences to the network admin. Now I am waiting to continue implementing the MRTG services.
Thanks,

thomazp 06-24-2016 12:22 PM

I need try a get to an address here, which command I use ?
But The address is unreachable , no ping to the address I need. The person asked it isn't here now.

thomazp 06-28-2016 02:49 PM

Someone Said this Kind of connection isn't necessary when monitoring like this. Can anyone send me a site conforming this is obviously needed.
Tks,

thomazp 06-28-2016 07:01 PM

The 2 ports above aren't opened in the destination device, I showed before.

Habitual 06-28-2016 07:20 PM

Quote:

Originally Posted by thomazp (Post 5567536)
Someone Said this Kind of connection isn't necessary when monitoring like this. Can anyone send me a site conforming this is obviously needed.

Yes, I can:http://www.net-snmp.org/docs/man/snmpd.conf.html

thomazp 06-28-2016 07:38 PM

Sorry I only noticed now:-(.
Tomorrow morning I will do it and post results going.
Tks

thomazp 06-30-2016 02:03 PM

See this:
# snmpwalk -v 2c -c netcomro 172.27.252.3 1.3.6.1.2.1.1
SNMPv2-MIB::sysDescr.0 = STRING: Extreme Networks, Inc. S8 Chassis Rev 08.22.01.
0023 04/07/2014--16:18 ofc
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.5624.2.1.133
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2094101068) 242 days, 8:56:50.
68
SNMPv2-MIB::sysContact.0 = STRING: Info.Telecomunicacoes
SNMPv2-MIB::sysName.0 = STRING: NC3DB2
SNMPv2-MIB::sysLocation.0 = STRING: BRA_SP_SaoPaulo_Matriz_DinoBueno_2Andar_CPD_
NC03DB02_Nucleo
SNMPv2-MIB::sysServices.0 = INTEGER: 79
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00

And for the other community the result was similar.
What to do now to configure MRTG to monitore this router ? Since is accepting SNMP requests.
Thanks,

thomazp 07-01-2016 09:25 AM

Now I'm having problems with cfgmaker, look:
# cfgmaker netcomro@172.27.252.3
SNMP Error:
no response received
SNMPv1_Session (remote host: "172.27.252.3" [172.27.252.3].161)
community: "netcomro"
request ID: -940212693
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib64/mrtg2/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.1 on netcomro@172.27.252.3::::::v4only
at /usr/bin/cfgmaker line 950
WARNING: Skipping netcomro@172.27.252.3: as no info could be retrieved
What have to do to create mrtg.cfg file.

thomazp 07-01-2016 10:01 AM

Is it possible to increase this timeout value to enable this connection ?

thomazp 07-01-2016 03:48 PM

Next try
 
Quote:

Originally Posted by thomazp (Post 5568929)
Is it possible to increase this timeout value to enable this connection ?

I tried this way:
# cfgmaker netcomro@172.27.252.3 -global "Workdir:/opt/apache2/ht
docs/mrtg" -output server.cfg
SNMP Error:
no response received
SNMPv1_Session (remote host: "172.27.252.3" [172.27.252.3].161)
community: "netcomro"
request ID: -1904685969
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib64/mrtg2/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.1 on netcomro@172.27.252.3::::::v4only
at /usr/bin/cfgmaker line 950
WARNING: Skipping netcomro@172.27.252.3: as no info could be retrieved

What should I do ?

Habitual 07-01-2016 05:45 PM

Quote:

Originally Posted by thomazp (Post 5569048)
SNMPWALK Problem for 1.3.6.1.2.1.1 on netcomro@172.27.252.3::::::v4only
at /usr/bin/cfgmaker line 950
WARNING: Skipping netcomro@172.27.252.3: as no info could be retrieved

That certainly is interesting ^^^

So, I consider the "WARNING" "progress" since earlier you could only get "Connection refused".
Now I suspect it ACL related in the snmpd.conf on the host being queried.

Try sniffing the traffic from 172.27.252.3:161 on wherever host this cfgmaker tools exists.
Using
Code:

sudo tcpdump -nn -i eth0 src 172.27.252.3 and port 161 -w capture.log -c 250
in one terminal and
I'd let this run for a few minutes and you should at least have a visual of "traffic".
Understanding it is not the issue atm., sorry. We just need visual feedback that our attempts
are in fact working up to a point.
In yet another terminal (or 'new' tab...) do your cfgmaker thing and then switch immediately to the tcpdump in the first tab, or terminal.

tcpdump with listen for traffic and dump to capture.log and only 250 packets and quit.
So, relax.
Don't do anything silly like try to open the capture.log.

On the other hand, if it doesn't sniff 250 packets on port 161 from that IP, that tcpdump command/terminal will sit there like a sentry, sniffing for 'noise' from 172.27.252.3 on port 161 until it does.

NOTE: Your "eth0" may differ...

thomazp 07-04-2016 01:15 PM

Now I need to start mrtg services.
The mrtg package is installed.
Also GD ,png and zlib .
SNMP is running.
What to do now?
The site instructions aren't working.

thomazp 07-05-2016 08:10 PM

I noticed I Can start mrtg, but soon The script ends. The .PNG files are old, not generated today or yesterday.
I need :
1 Example of cfgmaker cmd to generate the .cfg file ;
2 The way I fill in the contrab.
Thanks,

Habitual 07-06-2016 10:33 AM

Quote:

Originally Posted by thomazp (Post 5571073)
I noticed I Can start mrtg, but soon The script ends. The .PNG files are old, not generated today or yesterday.
I need :
1 Example of cfgmaker cmd to generate the .cfg file ;
2 The way I fill in the contrab.
Thanks,

http://www.netmon.org/cfgmaker.htm
suggests
Code:

perl cfgmaker public@172.27.252.3 --global "WorkDir: /opt/apache2/htdocs/mrtg/" --output server.cfg
but I don't think WorkDir is correct. Have you verified that location and do you have a /opt/apache2/htdocs/mrtg/server.cfg
file in that location presently?

Ports open yet?

TB0ne 07-06-2016 10:50 AM

Wow...this thread sounds familiar:
http://www.linuxquestions.org/questi...ne-4175583846/

thomazp 07-07-2016 03:31 PM

The MRTG is running and I Can generate some graphs. But all of them are with 0 kb/s showing nothing.
I ran using the cmd line. Before inserting in crontab, I want to test it with a simple script, like: start, run cmd , delay some time getting data and ending.
Is it possible only to show the capabilities here.
Thanks

TB0ne 07-07-2016 06:02 PM

Quote:

Originally Posted by thomazp (Post 5572103)
The MRTG is running and I Can generate some graphs. But all of them are with 0 kb/s showing nothing.
I ran using the cmd line. Before inserting in crontab, I want to test it with a simple script, like: start, run cmd , delay some time getting data and ending.
Is it possible only to show the capabilities here.
Thanks

And probably because you STILL haven't read the documentation you were pointed to, and are STILL using the wrong SNMP community, as you were spoon-fed in another thread.

CFGmaker probably did exactly what you asked...which is, generated you a file with V1 in it, so you're not getting data. If you won't provide complete details, ask a clear question, and keep things in ONE THREAD for ONE PROBLEM, or even follow the advice you're given, there isn't much point in posting.

thomazp 07-07-2016 07:41 PM

No , I put :::::2, in The Cfgmaker command.
As I said, I will be there approximately 9:30,10 am tomorrow. I am not there and it is ~10 pm.
Is there any way to test the .cfg file ?
I guess, it isn't the problem.
Thanks,


All times are GMT -5. The time now is 02:45 AM.