Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Post general support questions here that do not specifically fall into the Linux or Windows categories.
Moderators: Developers , Moderators
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Mon Jul 13, 2015 6:15 am
Hello,
I want to monitor my ISP modem, it is a Cisco EPC3010:
http://www.cisco.com/c/dam/en/us/produc ... 018339.pdf
In the documentation says that:
Remote manageability using SNMP V1/V2 and V3
I can access to the modem in
http://192.168.100.1 and see the signal power meters
I try snmpwalk but nothing:
Code: Select all
snmpwalk -v 1 -c public 192.168.100.1
snmpwalk -v 2c -c public 192.168.100.1
snmpwalk -v 1 -c cisco 192.168.100.1
snmpwalk -v 2c -c cisco 192.168.100.1
How could I get SNMP information for this device?
Anyone have same devices?
Best regards.
BSOD2600
Cacti Moderator
Posts: 12171 Joined: Sat May 08, 2004 12:44 pm
Location: USA
Post
by BSOD2600 » Mon Jul 13, 2015 12:12 pm
consult the vendor documentation on how to enable SNMP and allow external queries.
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Mon Jul 13, 2015 1:18 pm
BSOD2600 wrote: consult the vendor documentation on how to enable SNMP and allow external queries.
Thanks for the reply,
I search in the vendor documentation, but there is nothing about how to enable or get SNMP information from the device, it just says that it support in v1, v2 and v3 versions.
Regards.
BSOD2600
Cacti Moderator
Posts: 12171 Joined: Sat May 08, 2004 12:44 pm
Location: USA
Post
by BSOD2600 » Mon Jul 13, 2015 2:52 pm
ah, I overlooked the ISP part. Most of them block snmp from the customers. Search or ask if your ISP allows this on
http://dslreports.com/ - users might have already figured out what the private snmp community is -- IF its even allowed.
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Mon Jul 13, 2015 3:34 pm
BSOD2600 wrote: ah, I overlooked the ISP part. Most of them block snmp from the customers. Search or ask if your ISP allows this on
http://dslreports.com/ - users might have already figured out what the private snmp community is -- IF its even allowed.
Thanks again,
Yes, I think that it is blocked by ISP.
Is there any tool to scan different communities to debug a SNMP service?
I can do this from command line:
Code: Select all
wget http://192.168.100.1/Docsis_system.asp
Here is all the information:
http://paste.debian.net/282036/
Is it possible to make a script to get this values and use it in Cacti?
I will appreciate your help.
Best regards.
BSOD2600
Cacti Moderator
Posts: 12171 Joined: Sat May 08, 2004 12:44 pm
Location: USA
Post
by BSOD2600 » Tue Jul 14, 2015 11:52 am
Yes, it's possible. Search the script forum for cable scripts/templates -- others have already done this
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Tue Jul 14, 2015 3:08 pm
BSOD2600 wrote: Yes, it's possible. Search the script forum for cable scripts/templates -- others have already done this
Thanks BSOD2600,
I search for it, but I don't find nothing. I see your "DOCSIS Stats":
http://forums.cacti.net/viewtopic.php?p=55191
But it works with SNMP, and this will not work in my devices.
Could you point in the right direction?
I will appreciate your help.
Kind regards.
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Tue Jul 14, 2015 3:41 pm
Hello again,
I search a script!
http://forums.cacti.net/viewtopic.php?f=12&t=8688
I need to change the perl script, but I don't know how to do it. Here is a example of my device code:
Code: Select all
<td width="140" nowrap><script language="javascript" type="text/javascript">dw(vs_channel);</script> 1<script language="javascript" type="text/javascript">dw(vcolon);<$
<td class="stdbold" nowrap>43.0 <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
</tr>
<tr>
<td width="140" nowrap><script language="javascript" type="text/javascript">dw(vs_channel);</script> 2<script language="javascript" type="text/javascript">dw(vcolon);<$
<td class="stdbold" nowrap>43.0 <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
</tr>
<tr>
<td width="140" nowrap><script language="javascript" type="text/javascript">dw(vs_channel);</script> 3<script language="javascript" type="text/javascript">dw(vcolon);<$
<td class="stdbold" nowrap> 0.0 <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
</tr>
<tr>
<td width="140" nowrap><script language="javascript" type="text/javascript">dw(vs_channel);</script> 4<script language="javascript" type="text/javascript">dw(vcolon);<$
<td class="stdbold" nowrap> 0.0 <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
This is upstream channels (4 channels) power levels. How could I adjust it?
I need a little example of how to get one value, then I will continue with all channels.
Thanks and best regards.
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Wed Jul 15, 2015 2:31 pm
Thanks again,
I try with h¡the perls scripts, but the problem is that all data lines are same in my case. The code in the above post. This is the line with the data (XX.X):
Code: Select all
<td class="stdbold" nowrap>XX.X <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
<td class="stdbold" nowrap>XX.X <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
<td class="stdbold" nowrap>XX.X <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
<td class="stdbold" nowrap>XX.X <script language="javascript" type="text/javascript">dw(vdbmv);</script></td>
Those four values are dBmV for upstream channels (1,2,3, and 4).
Anyone with perl scripting skills could help?
Best regards.
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Wed Jul 15, 2015 2:55 pm
Hello,
I try to adapt a perl script.
This is what I have:
Code: Select all
#!/usr/bin/perl
use warnings;
use strict;
use LWP::Simple;
my %data;
my %trash;
my @keys = qw(DownPower1 DownSNR1 DownPower2 DownSNR2 DownPower3 DownSNR3 DownPower4 DownSNR4 DownPower5 DownSNR5 DownPower6 DownSNR6);
my $content = LWP::Simple::get("http://192.168.100.1/Docsis_system.asp") or die "Couldn't get it!";
$content =~ s/\ //g;
# regex in html source order
#if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownFreq} = $1; }
#if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownSNR} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownPower1} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownSNR1} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownPower2} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownSNR2} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownPower3} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownSNR3} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownPower4} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownSNR4} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownPower5} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownSNR5} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownPower6} = $1; }
if ($content =~ /<td class="stdbold" nowrap>(-?[0-9.]+) <script language/) { $data{DownSNR6} = $1; }
for (@keys) { print "$_:$data{$_} "; }
print "\n";
Code: Select all
$ perl modem.pl
DownPower1:40.9 DownSNR1:40.9 DownPower2:40.9 DownSNR2:40.9 DownPower3:40.9 DownSNR3:40.9 DownPower4:40.9 DownSNR4:40.9 DownPower5:40.9 DownSNR5:40.9 DownPower6:40.9 DownSNR6:40.9
The problem is that always I get same value for each variable. How could I get next value in each "$content"?
Kind regards.
BSOD2600
Cacti Moderator
Posts: 12171 Joined: Sat May 08, 2004 12:44 pm
Location: USA
Post
by BSOD2600 » Wed Jul 15, 2015 10:32 pm
based off that sample you sent, youre going to need to take into account each channel # with that parsing (assuming you want the data), and same with the upload. however, looking at the ugly javascript output its not going to be easy coming up with a regex...
jlazkano
Cacti User
Posts: 52 Joined: Wed Mar 25, 2009 5:39 pm
Post
by jlazkano » Thu Jul 16, 2015 3:40 pm
BSOD2600 wrote: based off that sample you sent, youre going to need to take into account each channel # with that parsing (assuming you want the data), and same with the upload. however, looking at the ugly javascript output its not going to be easy coming up with a regex...
Thanks again,
Yes, it will be difficult with this complicated html, and more with my code skills.
Which output need I get with the script?
Best regards.
BSOD2600
Cacti Moderator
Posts: 12171 Joined: Sat May 08, 2004 12:44 pm
Location: USA
Post
by BSOD2600 » Thu Jul 16, 2015 5:33 pm
jlazkano wrote: Which output need I get with the script?
Something like:
DownFreq:687000000 DownSNR:35 DownPower:-4 UpFreq:23984000 UpPower:45
Users browsing this forum: No registered users and 2 guests