Mikrotik RouterOS Statistics (Update 02/10/2009)
Moderators: Developers, Moderators
Hi
i have big problem whit Mikrotik - Wireless - Registration Table
When i click new graph->Data Query [Mikrotik - Wireless - Registration Table]->reload associeted query whit debug mode then i see :
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/www/vhosts//cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/local/bin/php -q /usr/www/vhosts/cacti/scripts/mikrotik_wireless_interfaces.php public 192.168.30.25 index'
+ Executing script query '/usr/local/bin/php -q /usr/www/vhosts/cacti/scripts/mikrotik_wireless_interfaces.php public 192.168.30.25 query ifName'
+ Executing script query '/usr/local/bin/php -q /usr/www/vhosts//cacti/scripts/mikrotik_wireless_interfaces.php public 192.168.30.25 query ifIndex'
+ Found data query XML file at '/usr/www/vhosts/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/www/vhosts/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/www/vhosts/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
all other options:
1) Mikrotik - Queue - Simple
2) Mikrotik - Queue - Tree
3) Mikrotik - Wireless - Client
4) SNMP - Interface Statistics
work ok
please help me what is wrong
i have big problem whit Mikrotik - Wireless - Registration Table
When i click new graph->Data Query [Mikrotik - Wireless - Registration Table]->reload associeted query whit debug mode then i see :
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/www/vhosts//cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/local/bin/php -q /usr/www/vhosts/cacti/scripts/mikrotik_wireless_interfaces.php public 192.168.30.25 index'
+ Executing script query '/usr/local/bin/php -q /usr/www/vhosts/cacti/scripts/mikrotik_wireless_interfaces.php public 192.168.30.25 query ifName'
+ Executing script query '/usr/local/bin/php -q /usr/www/vhosts//cacti/scripts/mikrotik_wireless_interfaces.php public 192.168.30.25 query ifIndex'
+ Found data query XML file at '/usr/www/vhosts/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/www/vhosts/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/www/vhosts/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
all other options:
1) Mikrotik - Queue - Simple
2) Mikrotik - Queue - Tree
3) Mikrotik - Wireless - Client
4) SNMP - Interface Statistics
work ok
please help me what is wrong
What did you expected to see?
What I see? I see that the script did not find any entries in wireless registration table.
My verbosed query produced:
What I see? I see that the script did not find any entries in wireless registration table.
My verbosed query produced:
Note: I have one connected client with mac 00:xx:yy:zz:xx:zz+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /cacti-dir/scripts/mikrotik_wireless_interfaces.php public 10.x.y.z index'
+ Executing script query '/usr/bin/php -q /cacti-dir/scripts/mikrotik_wireless_interfaces.php public 10.x.y.z query ifName'
+ Found item [ifName='ath0'] index: 00:xx:yy:zz:xx:zz
+ Executing script query '/usr/bin/php -q /cacti-dir/scripts/mikrotik_wireless_interfaces.php public 10.x.y.z query ifIndex'
+ Found item [ifIndex='00:xx:yy:zz:xx:zz'] index: 00:xx:yy:zz:xx:zz
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/cacti-dir/resource/script_server/mikrotik_wireless_interfaces.xml'
[i]Born to be online![/i]
Hi
Thanks for your answer.
Why in my wireless registration table dont show any connections?
What are taking data form MT as the same as Mikrotik - Wireless - Client - SNMP?
Maybe I should set any options in my MT?
Maybe when I querty wireless registration table I dont have corect configuration my PHP server? What check it?
Thanks for your answer.
Why in my wireless registration table dont show any connections?
What are taking data form MT as the same as Mikrotik - Wireless - Client - SNMP?
Maybe I should set any options in my MT?
Maybe when I querty wireless registration table I dont have corect configuration my PHP server? What check it?
-
- Posts: 5
- Joined: Fri Jul 18, 2008 5:14 pm
- Contact:
Error: XML: Hash version does not exist.
I keep getting this error when I try to load the host template file.
"Error: XML: Hash version does not exist."
I'm I doing something wrong ?
Regards
"Error: XML: Hash version does not exist."
I'm I doing something wrong ?
Regards
-
- Posts: 5
- Joined: Fri Jul 18, 2008 5:14 pm
- Contact:
Hi mojiro,
I thought about problem of counting active IP addresses at a time and as far as i'm concerned the only way would be to execute command via SSH
And then graph the output (number).
Are you interested in adding this feature? I am very much, and i offer my time to help.
Best Regards
I thought about problem of counting active IP addresses at a time and as far as i'm concerned the only way would be to execute command via SSH
Code: Select all
ip arp print count-only
Are you interested in adding this feature? I am very much, and i offer my time to help.
Best Regards
ARP cache is allready being graphed using snmp. It is working only on linux installations because of the usage of awk and grep.archon wrote:Hi mojiro,
I thought about problem of counting active IP addresses at a time and as far as i'm concerned the only way would be to execute command via SSHAnd then graph the output (number).Code: Select all
ip arp print count-only
Are you interested in adding this feature? I am very much, and i offer my time to help.
Best Regards
Do you have cacti on Windows? I will convert the counting scripts into php's one day, in order to be used from windows too.
[i]Born to be online![/i]
-
- Posts: 11
- Joined: Sun Mar 01, 2009 7:39 am
- Location: Saint-Petersburg, Russia
- Contact:
cacti_host_template_mikrotik.xml contains command that works incorrectly under FreeBSD:
1) snmpwalk is actually installed in /usr/local/bin, wc and awk are in /usr/bin/
2) IP-address must be located immediately before OID, after all switches.
When IP is passed as first argument, snmpwalk displays error:
-v2: Unknown Object Identifier (Sub-id not found: (top) -> -v2)
3) Cacti passes version "2", but snmpwalk knows about "2c" only:
Invalid version specified after -v flag: 2
USAGE: snmpwalk [OPTIONS] AGENT [OID]
IMHO, it would be better to put entire stuff into cacti/scripts/query_mikrotik_host.pl,
where it can be easily adopted for concrete platform:
So, fixed template should contain following command:
Code: Select all
/usr/bin/snmpwalk <ip> -v <ver> -c <comm> <oid> | /bin/wc -l | /bin/awk '{printf$0}'
2) IP-address must be located immediately before OID, after all switches.
When IP is passed as first argument, snmpwalk displays error:
-v2: Unknown Object Identifier (Sub-id not found: (top) -> -v2)
3) Cacti passes version "2", but snmpwalk knows about "2c" only:
Invalid version specified after -v flag: 2
USAGE: snmpwalk [OPTIONS] AGENT [OID]
IMHO, it would be better to put entire stuff into cacti/scripts/query_mikrotik_host.pl,
where it can be easily adopted for concrete platform:
Code: Select all
#!/usr/bin/perl
die "Usage: $0 ip ver comm oid\n" if @ARGV != 4;
my ($ip, $version, $community, $oid) = @ARGV;
$version = '2c' if $version eq '2';
open F, "/usr/local/bin/snmpwalk -v$version -c $community $ip $oid |";
my $lines = 0;
$lines++ while <F>;
close F;
print "$lines\n";
Code: Select all
perl <path_cacti>/scripts/query_mikrotik_host.pl <ip> <ver> <comm> <oid>
Some Graphs Don't Work
No errors on rrdtool.......
advise? using ROS v3.22
And
advise? using ROS v3.22
And
Sad Panda
Most of the other scripts from this pack do indeed work correctly....
eg...
&
&
These are few that ive tested thus far and work.
As for log...
Unfortunately this doesn't give me anything usefull and i have MANY hosts and graphs on this system already!
eg...
&
&
These are few that ive tested thus far and work.
As for log...
Code: Select all
04/12/2009 02:25:15 AM - SYSTEM THOLD STATS: Time:0.2167 Tholds:1 Hosts:0
04/12/2009 02:25:15 AM - SYSTEM STATS: Time:13.1128 Method:cmd.php Processes:1 Threads:N/A Hosts:20 HostsPerProcess:20 DataSources:236 RRDsProcessed:162
04/12/2009 02:25:14 AM - CMDPHP: Poller[0] Host[19] DS[196] WARNING: Result from SNMP not valid. Partial Result: U
04/12/2009 02:25:14 AM - CMDPHP: Poller[0] Host[18] DS[147] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:14 AM - CMDPHP: Poller[0] Host[18] DS[149] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:12 AM - CMDPHP: Poller[0] Host[10] DS[157] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:12 AM - CMDPHP: Poller[0] Host[10] DS[157] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:12 AM - CMDPHP: Poller[0] Host[10] DS[156] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:12 AM - CMDPHP: Poller[0] Host[10] DS[156] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:12 AM - CMDPHP: Poller[0] Host[10] DS[155] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:12 AM - CMDPHP: Poller[0] Host[10] DS[154] WARNING: Result from CMD not valid. Partial Result: U
04/12/2009 02:25:11 AM - CMDPHP: Poller[0] Host[9] DS[90] WARNING: Result from SNMP not valid. Partial Result: U
04/12/2009 02:25:11 AM - CMDPHP: Poller[0] Host[9] DS[90] WARNING: Result from SNMP not valid. Partial Result: U
04/12/2009 02:25:09 AM - CMDPHP: Poller[0] Host[8] NOTICE: HOST EVENT: Host Returned from DOWN State:
Unfortunately this doesn't give me anything usefull and i have MANY hosts and graphs on this system already!
Who is online
Users browsing this forum: No registered users and 2 guests