If this refers to Cacti graphs, it would be nice to have:
Number of PPPoE clients Connected
Number of Wireless Clients Connected per radio
Thanks
cknipe@fusion:~/src/mt_munin$ ./mikrotikppp_WMEO01-CORE01.mydomain config
host_name WMEO01-CORE01.mydomain
graph_args --base 1000 -l 0 -r --lower-limit 0
graph_title Active PPP Client Connections
graph_vlabel # of connections
graph_category network
graph_info This graph shows the active amount of ppp connections
graph_order async isdn l2tp ovpn pppoe pptp
async.label async
async.info ASync PPP Connections
isdn.label isdn
isdn.info ISDN PPP Connections
l2tp.label l2tp
l2tp.info L2TP PPP Connections
ovpn.label ovpn
ovpn.info OVPN PPP Connections
pppoe.label pppoe
pppoe.info PPPoE Connections
pptp.label pptp
pptp.info PPTP Connections
cknipe@fusion:~/src/mt_munin$ ./mikrotikppp_WMEO01-CORE01.mydomain
async.value 0
isdn.value 0
l2tp.value 0
ovpn.value 0
pppoe.value 1
pptp.value 0
like bad scripts do =) maybe it needs to be rewritten for one login per cycle?every script will login twice - once for a config, and once for getting values
Just FYI - I'm done now The one script still needs to be tweaked, and I'll add more scripts as/when I write them on a as needed and/or as requested basis...
$ chmod u+x /etc/munin/plugins/mikrotikcpu_192.168.1.1
$ chown munin:munin /etc/munin/plugins/mikrotikcpu_192.168.1.1
$ /etc/munin/plugins/mikrotikcpu_192.168.1.1
$ /etc/init.d/munin-node restart
r-c@rclr-srv:~$ telnet localhost 4949
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
# munin node at rclr-srv
Connection closed by foreign host.
[192.168.1.1]
address 127.0.0.1
[192.168.1.1]
address 192.168.1.1
host_name 192.168.1.1
graph_args -l 0 -r --vertical-label percent --lower-limit 0 --upper-limit 100
graph_title CPU usage
graph_category system
graph_info This graph shows the router's CPU usage.
graph_order Total
graph_vlabel %
graph_scale no
Total.label CPU Usage
Total.draw AREA
Total.warning 60
Total.critical 90
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
# munin node at rclr-srv
Connection closed by foreign host.
[192.168.1.1]
address 192.168.1.1
use_node_name yes
# Which port to bind to;
#host *
host 127.0.0.1
user root
group root
setsid yes
# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn't understand CIDR-style network notation. You may repeat
# the allow line as many times as you'd like
allow ^127\.0\.0\.1$
r-c@rclr-srv:~$ cat /etc/munin/munin-node.conf
#
# Example config-file for munin-node
#
log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1
# Which port to bind to;
#host *
host 127.0.0.1
user root
group root
setsid yes
# Regexps for files to ignore
ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
#host_name localhost.localdomain
# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn't understand CIDR-style network notation. You may repeat
# the allow line as many times as you'd like
allow ^127\.0\.0\.1$
r-c@rclr-srv:~$ cat /etc/munin/munin.conf
# Example configuration file for Munin, generated by 'make build'
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin
# Where to look for the HTML templates
tmpldir /etc/munin/templates
# Make graphs show values per minute instead of per second
#graph_period minute
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
#contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm
#
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg
# a simple host tree
[example.com]
address 127.0.0.1
use_node_name yes
#
# A more complex example of a host tree
#
## First our "normal" host.
# [fii.foo.com]
# address foo
#
## Then our other host...
# [fay.foo.com]
# address fay
#
## Then we want totals...
# [foo.com;Totals] #Force it into the "foo.com"-domain...
# update no # Turn off data-fetching for this "host".
#
# # The graph "load1". We want to see the loads of both machines...
# # "fii=fii.foo.com:load.load" means "label=machine:graph.field"
# load1.graph_title Loads side by side
# load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
#
# # The graph "load2". Now we want them stacked on top of each other.
# load2.graph_title Loads on top of each other
# load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
# load2.dummy_field.draw AREA # We want area instead the default LINE2.
# load2.dummy_field.label dummy # This is needed. Silly, really.
#
# # The graph "load3". Now we want them summarised into one field
# load3.graph_title Loads summarised
# load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
# load3.combined_loads.label Combined loads # Must be set, as this is
# # not a dummy field!
#
## ...and on a side note, I want them listen in another order (default is
## alphabetically)
#
# # Since [foo.com] would be interpreted as a host in the domain "com", we
# # specify that this is a domain by adding a semicolon.
# [foo.com;]
# node_order Totals fii.foo.com fay.foo.com
#
[192.168.1.1]
address 192.168.1.1
use_node_name yes
[R-C@MikroTik] snmp> print
enabled: yes
contact: "admin"
location: "mk1"
sudo /etc/munin/plugins/mikrotikcpu_10.1.30.1 config
host_name 10.1.30.1
graph_args -l 0 -r --vertical-label percent --lower-limit 0 --upper-limit 100
graph_title CPU usage
graph_category system
graph_info This graph shows the router's CPU usage.
graph_order Total
graph_vlabel %
graph_scale no
Total.label CPU Usage
Total.draw AREA
Total.warning 60
Total.critical 90
**@WW-LINUX-01:/etc/munin/plugins$
sudo /etc/init.d/munin-node restart
The address, will always be pointing to 127.0.0.1 as Munin needs to connect to our only real munin-node we have running on localhost.
telnet 127.0.0.1 4949
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
# munin node at localhost
nodes
localhost
.
quit
Connection closed by foreign host.
******@WW-LINUX-01:/etc/munin$
# munin node at localhost
list
open_inodes if_err_eth0 apache_processes mysql_slowqueries entropy irqstats processes if_eth0 if_err_eth2 mysql_threads df interrupts swap if_eth2 mysql_bytes load df_inode cpu if_err_eth1 if_eth1 mysql_queries mikrotikcpu_10.1.30.1 iostat forks open_files memory 10.1.30.1 vmstat
# Example configuration file for Munin, generated by 'make build'
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin
# Where to look for the HTML templates
tmpldir /etc/munin/templates
# Make graphs show values per minute instead of per second
#graph_period minute
# Graphics files are normaly generated by munin-graph, no matter if
# the graphs are used or not. You can change this to
# on-demand-graphing by following the instructions in
# http://munin.projects.linpro.no/wiki/CgiHowto
#
#graph_strategy cgi
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
#contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm
#
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg
# a simple host tree
[localhost]
address 127.0.0.1
use_node_name yes
[10.1.30.1]
127.0.0.1
use_node_name yes
#
# A more complex example of a host tree
#
## First our "normal" host.
# [fii.foo.com]
# address foo
#
## Then our other host...
# [fay.foo.com]
# address fay
#
## Then we want totals...
# [foo.com;Totals] #Force it into the "foo.com"-domain...
# update no # Turn off data-fetching for this "host".
#
# # The graph "load1". We want to see the loads of both machines...
# # "fii=fii.foo.com:load.load" means "label=machine:graph.field"
# load1.graph_title Loads side by side
# load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
#
# # The graph "load2". Now we want them stacked on top of each other.
# load2.graph_title Loads on top of each other
# load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
# load2.dummy_field.draw AREA # We want area instead the default LINE2.
# load2.dummy_field.label dummy # This is needed. Silly, really.
#
# # The graph "load3". Now we want them summarised into one field
# load3.graph_title Loads summarised
# load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
# load3.combined_loads.label Combined loads # Must be set, as this is
# # not a dummy field!
#
## ...and on a side note, I want them listen in another order (default is
## alphabetically)
#
# # Since [foo.com] would be interpreted as a host in the domain "com", we
# # specify that this is a domain by adding a semicolon.
# [foo.com;]
# node_order Totals fii.foo.com fay.foo.com
#
#
# Example config-file for munin-node
#
log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1
user root
group root
setsid yes
# Regexps for files to ignore
ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$
# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
host_name localhost
# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn't understand CIDR-style network notation. You may repeat
# the allow line as many times as you'd like
allow ^127\.0\.0\.1$
# Which address to bind to;
#host *
host 127.0.0.1
# And which port
port 4949
sudo link /etc/munin/plugins/mikrotikcpu_node1.somewhere.com /usr/share/munin/plugins/mikrotikcpu_node1.somewhere.com
sudo /etc/init.d/munin-node restart
telnet 127.0.0.1 4949
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
# munin node at localhost
nodes
10.1.30.1
localhost
.
quit
Connection closed by foreign host.
# telnet 127.0.0.1 4949
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
# munin node at XXXX.vitell.co.uk
nodes
181.87.193.10
xxxx.vitell.co.uk
.
quit
Connection closed by foreign host.
# telnet 127.0.0.1 4949
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
# munin node at xxxx.vitell.co.uk
list 181.87.193.10
mikrotikcpu_181.87.193.10 mikrotikdiskspace_181.87.193.10 mikrotikmemory_181.87.193.10
list xxxx.vitell.co.uk
open_inodes apache_processes entropy apache_accesses processes apache_volume squid_cache df interrupts netstat swap load if_err_venet0 df_inode cpu if_venet0 forks open_files memory squid_requests squid_traffic vmstat
quit
Connection closed by foreign host.
Use of /g modifier is meaningless in split at
/usr/lib/perl5/vendor_perl/5.8.8/Net/Telnet/Cisco.pm line 756 (#1)
(W regexp) You used the /g modifier on the pattern for a split
operator. Since split always tries to match the pattern
repeatedly, the /g has no effect.
#!/usr/bin/php
<?php
// Use the ROS API.
require('routeros_api.class.php');
// Create a new instance
$API = new routeros_api();
// debug - true or false
$API->debug = false;
// First things first, get the information we want to look at
if ($API->connect('111.222.111.222', 'USER', 'PASS')) {
$API->write('/interface/wireless/registration-table/getall');
$ARRAY = $API->read();
$API->disconnect();
} else {
die("Unable to connect to API.");
}
// Work out the hostname to use based on the filename called
$hostname = explode("_",$argv[0],2);
// And die if there isn't one.
if (! isset($hostname[1])) {
die("No hostname available");
}
// If the first argument is 'config', then do the config stuff.
if ($argc > 1 && $argv[1] == 'config') {
printconfig($hostname[1]);
if (!empty($ARRAY)) {
foreach ($ARRAY as $value) {
print $value["interface"] . ".label " . $value["interface"] . "\n";
}
}
exit;
}
// Otherwise, display the values.
if (!empty($ARRAY)) {
foreach ($ARRAY as $value) {
$signal=explode("d",$value["signal-strength"],2);
$signal=$signal[0];
print $value["interface"] . ".value " . $signal . "\n";
}
}
exit;
// Function which prints the information needed for 'config'.
function printconfig($hostname) {
print "host_name $hostname\n";
print "graph_args -l 0 --lower-limit -100 --upper-limit 0\n";
print "graph_title Wireless Interface Registrations (Signal Strength)\n";
print "graph_vlabel dBm Signal\n";
print "graph_category network\n";
print "graph_info This graph shows the wireless registration signal strength\n";
print "graph_scale no\n";
}
?>
/etc/munin/plugins/mikrotikwirelessregistrations_181.87.78.85
wlan2.value -84
wlan3.value -58
Known issue with newer versions of Net::Telnet::Cisco yes. Change it to use Net::Telnet and ammend the regex for the prompt acordingly. It works absolutely fine, i.e:With the mikrotikppp_HOST script:After some digging, it appears that this is a known bug in some versions of Net::Telnet::Cisco. In my case, the CentOS supplied package (perl-Net-Telnet-Cisco) comes complete with this bug. In case anybody else has this problem, edit the file mentioned in the error message and change the line from "return wantarray ? split /$/mg, $_ : $_; # ORS instead?" to "return wantarray ? split /$/m, $_ : $_; # ORS instead?". How this affects other things I could not say, but given that I installed Net::Telnet::Cisco specifically for this purpose, it works fine for me.Code: Select allUse of /g modifier is meaningless in split at /usr/lib/perl5/vendor_perl/5.8.8/Net/Telnet/Cisco.pm line 756 (#1) (W regexp) You used the /g modifier on the pattern for a split operator. Since split always tries to match the pattern repeatedly, the /g has no effect.
use Net::Telnet;
...
my $Telnet = new Net::Telnet (Timeout => 10,
Prompt => '/\[.+\] > $/'); # <-- NB Critical
$Telnet->open($Data['2']);
$Telnet->login(RLM_TELNET_USER . '+ct', RLM_TELNET_PASS);
@Output = $Telnet->cmd("whatever");
...
Thanks. I've noticed this a while ago, never got arround to updating it.Also, there is a bug in the script. Munin doesn't like a graph_vlabel with spaces in it. I replaced "# of connections" with "number" and it worked just fine. I have updated the wiki accordingly.
1) For some reason, these things don't always work when you have physical plugin commands. Best practises, use, and stick to, symlinks.Interestingly (and apropos of my last post), I have four hosts being monitored from the one box:
MT_1
MT_2
localhost
remotehost
Whilst the mikrotikcpu (and diskspace and memory) plugins only work against the MT_x hosts, mikrotikppp works against MT_1, localhost and remotehost, but not MT_2. What gives?
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
# munin node at fusion
nodes
WMEO01-CORE01
WMEO01-EDGE01
fusion
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
# munin node at fusion
list fusion
open_inodes asterisk_channelstypes irqstats mysql_slowqueries if_eth0 apache_accesses squid_cache raid ntp_states mysql_threads apt df uptime swap load postfix_mailstats df_inode cpu mysql_queries open_files iostat forks asterisk_voicemail memory ntp_igubu_saix_net vmstat asterisk_channels asterisk_iaxchannels if_err_eth0 apache_processes entropy asterisk_iaxpeers postfix_mailqueue processes asterisk_iaxlag apache_volume ntp_queries metar_pressure asterisk_sipchannels netstat interrupts mysql_bytes asterisk_sippeers munin_graph metar_temp postfix_mailvolume munin_update asterisk_codecs squid_requests metar_wind squid_traffic ntp_induna_saix_net
Can you post what the output of mikrotikwirelessregistrations_181.87.78.85 config returns?
host_name 181.87.78.85
graph_args -l 0 --lower-limit -100 --upper-limit 0
graph_title Wireless Interface Registrations (Signal Strength)
graph_vlabel dBm Signal
graph_category network
graph_info This graph shows the wireless registration signal strength
graph_scale no
wlan2.label wlan2
wlan3.label wlan3
root@fusion:/etc/munin/plugins# ./mikrotikwirelessinterface_WMEO01-EDGE01 config
host_name WMEO01-EDGE01
graph_args -l 0 --lower-limit -100 --upper-limit 100
graph_title Wireless Interface Quality (MACAddress)
graph_vlabel Comms Quality
graph_category network
graph_info This graph shows the wireless interface statistics
graph_order txccq rxccq txsignal txrate rxrate acttimeout noisefloor
graph_scale no
txccq.label TX CCQ (%)
rxccq.label RX CCQ (%)
txsignal.label TX Signal Strength (dBm)
acttimeout.label ACT Timeout (us)
noisefloor.label Noise Floor (dBm)
txrate.label TX Rate (Mbps)
rxrate.label RX Rate (Mbps)
Nope. Although the graph now has the correct scale, nothing's being plotted on it (I suspect that what's there is still positive and out of range of the graph.Try setting the upper limit to 1
Sure.please could you post here you munin.conf and munin-node.conf
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin
tmpldir /etc/munin/templates
[localhost]
address 127.0.0.1
use_node_name yes
[xxxx.vitell.co.uk]
address 1.2.3.4
use_node_name no
[MT_1]
address 127.0.0.1
use_node_name no
[MT_2]
address 127.0.0.1
use_node_name no
log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1
host *
user root
group root
setsid yes
ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
allow ^127\.0\.0\.1$
I have added another piece of code (using the PHP API) to the wiki which allows the active DHCP leases to be graphed.
Heh. I know what you mean. I just wrote it as an exercise to see what could be monitored and for no other reason. However, I found a use for it pretty much straight after I wrote it - I use ROS at home and share my Internet connection with my neighbours. Monitoring firewall rules makes it a piece of cake to graph bandwidth use by each of those neighbours. I simply add a rule which matches their traffic and which does nothing (passthrough). It doesn't give me absolute figures, but it does show me when they're hammering the connection and for how long.(except the firewallrule count that can't imagine an use...)
mikrotikfirewallrules_
Installation: Advanced
Technology Used: API (PHP)
Notes: Produces a graph which shows the number of active firewall rules for each chain.
Ah sorry. Mea Culpa. Well, the theory was that individual people could contribute firewall rules to various chains and that it may be useful to see when changes have been made. It's also handy to see when dynamic rules have been added/removed. Again, not a useful tool in itself, but it could provide a reasonable overview.That's not the monitoring i was pointing out:
Sadly, in my experience, any number of small-ish companies who don't want to employ one person to look after their infrastructure and who shares the work out amongst a team of people.Which scenario has multiple network admins that continuosly add/remove firewall filter rules?
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName monitor.example.com
DocumentRoot /var/www/munin
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
CustomLog /var/log/apache2/monitor.example.com.access.log combined
ErrorLog /var/log/apache2/monitor.example.com.error.log
ServerSignature On
</VirtualHost>
# Example configuration file for Munin, generated by 'make build'
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin
tmpldir /etc/munin/templates
# Where to look for the HTML templates
tmpldir /etc/munin/templates
# Make graphs show values per minute instead of per second
#graph_period minute
# Graphics files are normaly generated by munin-graph, no matter if
# the graphs are used or not. You can change this to
# on-demand-graphing by following the instructions in
# http://munin.projects.linpro.no/wiki/CgiHowto
#
#graph_strategy cgi
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
#contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm
#
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg
# a simple host tree
[localhost]
address 127.0.0.1
use_node_name yes
[192.168.1.1]
address 127.0.0.1
#
# A more complex example of a host tree
#
## First our "normal" host.
# [fii.foo.com]
# address foo
#
## Then our other host...
# [fay.foo.com]
# address fay
#
## Then we want totals...
# [foo.com;Totals] #Force it into the "foo.com"-domain...
# update no # Tur#
# # The graph "load1". We want to see the loads of both machines...
# # "fii=fii.foo.com:load.load" means "label=machine:graph.field"
# load1.graph_title Loads side by side
# load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
#
# # The graph "load2". Now we want them stacked on top of each other.
# load2.graph_title Loads on top of each other
# load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
# load2.dummy_field.draw AREA # We want area instead the default LINE2.
# load2.dummy_field.label dummy # This is needed. Silly, really.
#
# # The graph "load3". Now we want them summarised into one field
# load3.graph_title Loads summarised
# load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
# load3.combined_loads.label Combined loads # Must be set, as this is
# # not a dummy field!
#
## ...and on a side note, I want them listen in another order (default is
## alphabetically)
#
# # Since [foo.com] would be interpreted as a host in the domain "com", we
# # specify that this is a domain by adding a semicolon.
# [foo.com;]
# node_order Totals fii.foo.com fay.foo.com
#
n off data-fetching for this "host".
#
# Example config-file for munin-node
#
log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1
user root
group root
setsid yes
# Regexps for files to ignore
ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$
# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
host_name localhost
# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn't understand CIDR-style network notation. You may repeat
# the allow line as many times as you'd like
allow ^127\.0\.0\.1$
host_name 192.168.1.1
graph_args -l 0 -r --vertical-label percent --lower-limit 0 --upper-limit 100
graph_title CPU usage
graph_category system
graph_info This graph shows the router's CPU usage.
graph_order Total
graph_vlabel %
graph_scale no
Total.label CPU Usage
Total.draw AREA
Total.warning 60
Total.critical 90
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
# munin node at localhost
Connection closed by foreign host.
r-c@ubuntu-server:~$ sudo /etc/munin/plugins/mikrotikwirelessconnected_192.168.76.1 config
Uncaught exception from user code:
problem connecting to "192.168.76.1", port 23: Connection refused at /etc/munin/plugins/mikrotikwirelessconnected_192.168.76.1 line 22
at /usr/share/perl5/Net/Telnet.pm line 2036
Net::Telnet::_croak('Net::Telnet::Cisco=GLOB(0x9de2360)', 'problem connecting to "192.168.76.1", port 23: Connection ref...') called at /usr/share/perl5/Net/Telnet.pm line 539
Net::Telnet::error('Net::Telnet::Cisco=GLOB(0x9de2360)', '') called at /usr/share/perl5/Net/Telnet/Cisco.pm line 542
Net::Telnet::Cisco::error('Net::Telnet::Cisco=GLOB(0x9de2360)', '') called at /usr/share/perl5/Net/Telnet.pm line 1307
Net::Telnet::open('Net::Telnet::Cisco=GLOB(0x9de2360)') called at /usr/share/perl5/Net/Telnet.pm line 193
Net::Telnet::new('Net::Telnet::Cisco', 'Host', 192.168.76.1, 'Port', 23, 'Prompt', '/[\>\#] $/', 'Timeout', 30, ...) called at /usr/share/perl5/Net/Telnet/Cisco.pm line 46
Net::Telnet::Cisco::new('Net::Telnet::Cisco', 'Host', 192.168.76.1, 'Port', 23, 'Prompt', '/[\>\#] $/', 'Timeout', 30, ...) called at /etc/munin/plugins/mikrotikwirelessconnected_192.168.76.1 line 22
The problem was: I had to: sudo chmod -R a+rwx(i allowed it to run for all users), but you can limit it to user you want.
It shows me this error in mikrotikwirelessconnected template:Version of routeros is: 4,10.Code: Select allr-c@ubuntu-server:~$ sudo /etc/munin/plugins/mikrotikwirelessconnected_192.168.76.1 config Uncaught exception from user code: problem connecting to "192.168.76.1", port 23: Connection refused at /etc/munin/plugins/mikrotikwirelessconnected_192.168.76.1 line 22 at /usr/share/perl5/Net/Telnet.pm line 2036 Net::Telnet::_croak('Net::Telnet::Cisco=GLOB(0x9de2360)', 'problem connecting to "192.168.76.1", port 23: Connection ref...') called at /usr/share/perl5/Net/Telnet.pm line 539 Net::Telnet::error('Net::Telnet::Cisco=GLOB(0x9de2360)', '') called at /usr/share/perl5/Net/Telnet/Cisco.pm line 542 Net::Telnet::Cisco::error('Net::Telnet::Cisco=GLOB(0x9de2360)', '') called at /usr/share/perl5/Net/Telnet.pm line 1307 Net::Telnet::open('Net::Telnet::Cisco=GLOB(0x9de2360)') called at /usr/share/perl5/Net/Telnet.pm line 193 Net::Telnet::new('Net::Telnet::Cisco', 'Host', 192.168.76.1, 'Port', 23, 'Prompt', '/[\>\#] $/', 'Timeout', 30, ...) called at /usr/share/perl5/Net/Telnet/Cisco.pm line 46 Net::Telnet::Cisco::new('Net::Telnet::Cisco', 'Host', 192.168.76.1, 'Port', 23, 'Prompt', '/[\>\#] $/', 'Timeout', 30, ...) called at /etc/munin/plugins/mikrotikwirelessconnected_192.168.76.1 line 22
make sure you have telnet access to your router from that serverport 23: Connection refused