mikaku / Monitorix

Monitorix is a free, open source, lightweight system monitoring tool.
https://www.monitorix.org
GNU General Public License v2.0
1.12k stars 167 forks source link

Request : port feature with ipv6 #67

Closed Tarjaizaid closed 9 years ago

Tarjaizaid commented 10 years ago

Hello,

The "port" feature make graph with iptables (monitorix_*) (ipv4), the ipv6 (ipv6tables) graph not support.

Could You add this feature ?

Thanks Tarjaizaid

mikaku commented 10 years ago

Hello,

That's an interesting feature.

I think that I could add two new protocol types to cover IPv6: tcp6 and upd6 in the <port> section. These two new keys would create the corresponding iptables rules in the IPv6 tables.

I'll investigate what could be the best implementation to keep backwards compatibility while at the same time one can monitor a network port either in IPv4 and IPv6.

I'll keep you informed. Thanks!

mikaku commented 9 years ago

Please, check the new code (lib/ports.pm and /lib/Monitorix.pm) and let me know if that works as expected.

Thanks.

Tarjaizaid commented 9 years ago

Hello,

Thanks for your work.

i've tested the feature.

When i've restart monitorix, i've this errors :

Sat Feb 21 17:48:20 2015 - Exiting. Sat Feb 21 17:48:23 2015 - Starting Monitorix version 3.6.0 (pid 1214). Sat Feb 21 17:48:23 2015 - Loaded main configuration file '/etc/monitorix/monitorix.conf'. Sat Feb 21 17:48:23 2015 - Loading extra configuration file '/etc/monitorix/conf.d/00-debian.conf'. Sat Feb 21 17:48:23 2015 - Loading extra configuration file '/etc/monitorix/conf.d/50-perso.conf'. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/Monitorix.pm line 317. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/Monitorix.pm line 318. Sat Feb 21 17:48:23 2015 - Initializing graphs. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 144. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 144. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 144. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 144. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 146. Sat Feb 21 17:48:23 2015 - Generating the 'index.html' file. Sat Feb 21 17:48:23 2015 - Started built-in HTTP server (pid 1240). Sat Feb 21 17:48:23 2015 - Ok, ready. Sat Feb 21 17:48:23 2015 - WARNING: the built-in HTTP server has authentication disabled.

And, when we use all6 option, i've this error :

ip6tables v1.4.14: unknown option "--sport" Try ip6tables -h' or 'ip6tables --help' for more information. ip6tables v1.4.14: unknown option "--sport" Tryip6tables -h' or 'ip6tables --help' for more information.

Thx

2015-02-16 18:02 GMT+01:00 Jordi Sanfeliu notifications@github.com:

Please, check the new code (lib/ports.pm and /lib/Monitorix.pm) and let me know if that works as expected.

Thanks.

— Reply to this email directly or view it on GitHub https://github.com/mikaku/Monitorix/issues/67#issuecomment-74539842.

mikaku commented 9 years ago

Can you please paste the <port> section of your configuration file?

Tarjaizaid commented 9 years ago
max = 9 rule = 24000 list = 5565,5560,5555,4000 5555 = Test1, udp, in, 0, 1000 5560 = Test2, tcp, in, 0, 1000 5565 = Test3, tcp, in, 0, 1000 4000 = TEST6, tcp6,in,0,1000 graphs_per_row = 3

2015-02-21 18:18 GMT+01:00 Jordi Sanfeliu notifications@github.com:

Can you please paste the section of your configuration file?

— Reply to this email directly or view it on GitHub https://github.com/mikaku/Monitorix/issues/67#issuecomment-75381532.

Tarjaizaid commented 9 years ago

And, in monitorix log file, i've many log with

Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 209. Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/port.pm line 210.

2015-02-21 18:43 GMT+01:00 Sylvain Tgz tarjaizaid@gmail.com:

max = 9 rule = 24000 list = 5565,5560,5555,4000 5555 = Test1, udp, in, 0, 1000 5560 = Test2, tcp, in, 0, 1000 5565 = Test3, tcp, in, 0, 1000 4000 = TEST6, tcp6,in,0,1000 graphs_per_row = 3

2015-02-21 18:18 GMT+01:00 Jordi Sanfeliu notifications@github.com:

Can you please paste the section of your configuration file?

— Reply to this email directly or view it on GitHub https://github.com/mikaku/Monitorix/issues/67#issuecomment-75381532.

mikaku commented 9 years ago

OK, I've just used the same 'port' section you pasted above and I've not got any of the error messages you also pasted above. All is working finely.

Please, make sure you upgraded correctly your 3.6.0 version to the latest commit of master branch (not only the port.pm module).

Thanks.

Tarjaizaid commented 9 years ago

Hello,

Sorry, i've only copy lib/ports.pm and /lib/Monitorix.pm.

After copy the repostory, error "Use of uninitialized value in concatenation" isn't present.

If i use all6 option, i've always this error : ip6tables v1.4.14: unknown option "--sport"

thx

2015-02-23 10:07 GMT+01:00 Jordi Sanfeliu notifications@github.com:

OK, I've just used the same '' section you pasted above and I've not got any of the error messages you also pasted above. All is working finely.

Please, make sure you upgraded correctly your 3.6.0 version to the latest commit of master branch (not only the port,pm module).

Thanks.

— Reply to this email directly or view it on GitHub https://github.com/mikaku/Monitorix/issues/67#issuecomment-75509004.

mikaku commented 9 years ago

iptables requires a specific protocol when using source port numbering. So, all and all6 are no longer valid protocol names in that graph, instead, use tcp or tcp6 and udp or udp6.

Thanks.