Page 1 of 1

Redis Installation for nagios monitoring

Posted: Mon Apr 14, 2014 3:41 am
by alajangi
Hi Experts,

We are using nagios core version 4.0.1 on centos 6.5, I am trying to install redis on CPAN to configure the plugin "check_redis.pl" for monitoring redis on remote machine, when I entered the below commands on my remote redis server the result is as shown below, please help me on this error

# yum -y install perl-CPAN
# cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]> install Redis
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
Database was generated on Thu, 10 Apr 2014 17:17:02 GMT
CPAN: LWP::UserAgent loaded ok (v6.05)
CPAN: Time::HiRes loaded ok (v1.9726)
Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp17328'. Giving up on it. at /usr/share/perl5/CPAN/Index.pm line 225.
Fetching with LWP:
http://www.perl.org/CPAN/authors/01mailrc.txt.gz
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.021)
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/02pack ... ils.txt.gz
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Mon, 14 Apr 2014 07:41:02 GMT
..............
New CPAN.pm version (v2.00) available.
[Currently running version is v1.9402]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.


..............................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/03modlist.data.gz
Going to read '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Going to write /root/.cpan/Metadata
Running install for module 'Redis'
CPAN: Data::Dumper loaded ok (v2.151)
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for D/DA/DAMS/Redis-1.972.tar.gz
CPAN: Digest::SHA loaded ok (v5.88)
Checksum for /root/.cpan/sources/authors/id/D/DA/DAMS/Redis-1.972.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
CPAN: Archive::Tar loaded ok (v1.58)
Redis-1.972
Redis-1.972/README
Redis-1.972/Changes
Redis-1.972/LICENSE
Redis-1.972/dist.ini
Redis-1.972/META.yml
Redis-1.972/MANIFEST
Redis-1.972/Build.PL
Redis-1.972/Makefile.PL
Redis-1.972/lib
Redis-1.972/lib/Redis.pm
Redis-1.972/t
Redis-1.972/t/01-basic.t
Redis-1.972/t/03-pubsub.t
Redis-1.972/t/11-timeout.t
Redis-1.972/t/30-scripts.t
Redis-1.972/t/00-compile.t
Redis-1.972/t/04-pipeline.t
Redis-1.972/t/05-nonblock.t
Redis-1.972/t/10-tie-list.t
Redis-1.972/t/20-tie-hash.t
Redis-1.972/t/02-responses.t
Redis-1.972/t/07-reconnect.t
Redis-1.972/t/50-fork_safe.t
Redis-1.972/lib/Redis
Redis-1.972/lib/Redis/Hash.pm
Redis-1.972/lib/Redis/List.pm
Redis-1.972/t/06-on-connect.t
Redis-1.972/scripts
Redis-1.972/scripts/publish.pl
Redis-1.972/t/08-unix-socket.t
Redis-1.972/t/42-client_cmds.t
Redis-1.972/t/release-distmeta.t
Redis-1.972/lib/Redis/Sentinel.pm
Redis-1.972/t/release-pod-coverage.t
Redis-1.972/scripts/redis-benchmark.pl
Redis-1.972/t/tlib/Test
Redis-1.972/t/tlib/Test/SpawnRedisServer.pm
Redis-1.972/tools/benchmarks
Redis-1.972/tools/benchmarks/read_vs_sysread.pl
Redis-1.972/t/tlib/Test/SpawnRedisTimeoutServer.pm
Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv
Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/run.pl
Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-recv.pl
Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-sysread.pl
Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-readline.pl
Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/server-generator.pl
CPAN: File::Temp loaded ok (v0.22)
CPAN: Module::Build loaded ok (v0.35)

CPAN.pm: Going to build D/DA/DAMS/Redis-1.972.tar.gz

Can't locate Module/Build/Tiny.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Build.PL line 2.
BEGIN failed--compilation aborted at Build.PL line 2.
Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
DAMS/Redis-1.972.tar.gz
/usr/bin/perl Build.PL --installdirs site -- NOT OK
Running Build test
Make had some problems, won't test
Running Build install
Make had some problems, won't install
Could not read '/root/.cpan/build/Redis-1.972-VY3ijn/META.yml'. Falling back to other methods to determine prerequisites
Failed during this command:
DAMS/Redis-1.972.tar.gz : writemakefile NO '/usr/bin/perl Build.PL --installdirs site' returned status 512
Thanks,
Kishore.

Re: Redis Installation for nagios monitoring

Posted: Mon Apr 14, 2014 10:57 am
by slansing
This is not a nagios related question, but we can try to lend a hand... Looks like you are missing the (Tiny) perl module, Redis likely has prerequisites that need to be installed prior to installing it. I'd recommend you research those and get them installed first.

Re: Redis Installation for nagios monitoring

Posted: Tue Apr 15, 2014 2:55 am
by alajangi
Hi Slansing,

Thanks for your reply,

I've downloaded check_redis.pl file from http://exchange.nagios.org/directory/Pl ... pl/details, when I run this I am getting this error please explain me to get rid out of this.

Code: Select all

# ./check_redis.pl 
Can't locate Redis.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_redis.pl line 421.
BEGIN failed--compilation aborted at ./check_redis.pl line 421.
Thanks,
Kishore.

EDIT: Hi All,

I got success by did below,

Code: Select all

# cpan
install Bundle::CPAN
quit
# cpan
o conf commit
install Redis
quit
#  yum install perl-Nagios-Plugin
# ./check_redis.pl 
Please specify hostname (-H)
Usage: ./check_redis.pl [-v [debugfilename]] -H <host> [-p <port>] [-x password | -C credentials_file] [-D <database>] [-a <statistics variables> -w <variables warning thresholds> -c <variables critical thresholds>] [-A <performance output variables>] [-T [conntime_warn,conntime_crit]] [-R [hitrate_warn,hitrate_crit]] [-m [mem_utilization_warn,mem_utilization_crit] [-M <maxmemory>[B|K|M|G]]] [-r replication_delay_time_warn,replication_delay_time_crit]  [-f] [-T <timeout>] [-V] [-P <previous performance data in quoted string>] [-q (GET|LLEN|HLEN|SLEN|ZLEN|HGET:name|HEXISTS:name|SEXISTS:name|LRANGE:(AVG|SUM|MIN|MAX):start:end|ZRANGE:(AVG|SUM|MIN|MAX):start:end),query_type,query_key_name[:data_name][,ABSENT:WARNING|CRITICAL][,WARN:threshold,CRIT:threshold]] [-o <threshold specification with name or pattern>]
For more details on options do: ./check_redis.pl --help

Re: Redis Installation for nagios monitoring

Posted: Tue Apr 15, 2014 9:26 am
by slansing
Excellent, glad to see you got it working. In the future before asking here, I'd recommend you contact the group that produces the software you are trying to use. They would probably be able to help quicker than us on issues related to their software...