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

Log message not correct for redis when using socket #318

Closed mmattel closed 3 years ago

mmattel commented 3 years ago

When using a socket instead a host:post configuration for redis, the log is spamed falsly with:

redis::redis_update: unable to connect to port '' on host ''/var/run/redis/redis-server.sock'': Invalid argument

This should be corrected because when using a socket, there is no port. Means, if there is no :port in the definition, the check must be if you are able to connect to the socket and report that in case of issues.

When restarting monitorix, the log tells in addition:

Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/system.pm line 9        55.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/system.pm line 9        76.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/system.pm line 1        034.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/system.pm line 1        056.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 54        0.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 56        6.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 64        7.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 67        3.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 74        8.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 77        1.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 83        7.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 85        9.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 92        7.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 95        0.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 10        37.
Use of uninitialized value in concatenation (.) or string at /usr/lib/monitorix/redis.pm line 10        59.
Use of uninitialized value $port in concatenation (.) or string at /usr/lib/monitorix/redis.pm l        ine 192.

Note: pls consider that redis can have the setting to use a password to access it. This is atm not considered at all.

mikaku commented 3 years ago

Sockets in redis.pm are not supported right now.

You already have been opened the same question in issue #316.

mikaku commented 3 years ago

This issue asks request solution for two problems:

When using a socket instead a host:post configuration for redis, the log is spamed falsly with:

At the time the issue was created socket file connections were not supported. Please, refer to #316 and test that new feature.

Note: pls consider that redis can have the setting to use a password to access it. This is atm not considered at all.

Can you, please, provide an example of redis.conf configured for password authentication?

mikaku commented 3 years ago

Closing due to no response for two weeks.

If you still need more information, please add a comment and the issue can be reopened.