collectd安装redis插件

安装collectd的结果:

Configuration:
  Libraries:
    intel mic . . . . . . no (MicAccessApi not found)
    libaquaero5 . . . . . no (libaquaero5.h not found)
    libatasmart . . . . . no (atasmart.h not found)
    libcurl . . . . . . . no (curl-config failed)
    libdbi  . . . . . . . no (dbi/dbi.h not found)
    libesmtp  . . . . . . no (libesmtp not found)
    libganglia  . . . . . no (gm_protocol.h not found)
    libgcrypt . . . . . . no (gcrypt.h not found)
    libhal  . . . . . . . no
    libhiredis  . . . . . no (hiredis.h not found)
    libi2c-dev  . . . . . no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)
    libiokit  . . . . . . no
    libiptc . . . . . . . no (pkg-config doesn't know libiptc)
    libjvm  . . . . . . . no (jar not found)
    libkstat  . . . . . . no (Solaris only)
    libkvm  . . . . . . . no
    libldap . . . . . . . no ('ldap.h' not found)
    liblvm2app  . . . . . no (lvm2app.h not found)
    libmemcached  . . . . no (libmemcached/memcached.h not found)
    libmnl  . . . . . . . no (symbol 'mnl_nlmsg_get_payload' not found)
    libmodbus . . . . . . no (pkg-config doesn't know libmodbus)
    libmongoc . . . . . . no ('mongo.h' not found)
    libmysql  . . . . . . yes
    libnetapp . . . . . . no (netapp_api.h not found)
    libnetsnmp  . . . . . no (net-snmp-config failed)
    libnotify . . . . . . no (No package 'libnotify' found)
    liboconfig  . . . . . yes (shipped version)
    libopenipmi . . . . . no (pkg-config doesn't know OpenIPMIpthread)
    liboping  . . . . . . no (oping.h not found)
    libowcapi . . . . . . no (owcapi.h not found)
    libpcap . . . . . . . no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)
    libperfstat . . . . . no (AIX only)
    libperl . . . . . . . yes (version 5.10.1)
    libpq . . . . . . . . no (libpq-fe.h not found)
    libpthread  . . . . . yes
    librabbitmq . . . . . no (amqp.h not found)
    librdkafka  . . . . . no (librdkafka/rdkafka.h not found)
    librouteros . . . . . no (routeros_api.h not found)
    librrd  . . . . . . . no (rrd.h not found)
    libsensors  . . . . . no (sensors/sensors.h not found)
    libsigrok   . . . . . no (libsigrok/libsigrok.h not found)
    libstatgrab . . . . . no (pkg-config doesn't know libstatgrab)
    libtokyotyrant  . . . no (tcrdb.h not found)
    libudev . . . . . . . no (libudev.h not found)
    libupsclient  . . . . no (pkg-config doesn't know libupsclient)
    libvarnish  . . . . . no (pkg-config doesn't know varnishapi)
    libvirt . . . . . . . no (pkg-config doesn't know libvirt)
    libxml2 . . . . . . . yes
    libxmms . . . . . . . no
    libyajl . . . . . . . no (yajl/yajl_parse.h not found)
    oracle  . . . . . . . no (ORACLE_HOME is not set)
    protobuf-c  . . . . . no
    python  . . . . . . . yes

  Features:
    daemon mode . . . . . yes
    debug . . . . . . . . no

  Bindings:
    perl  . . . . . . . . yes (PREFIX=NONE)

  Modules:
    aggregation . . . . . yes
    amqp    . . . . . . . no
    apache  . . . . . . . no
    apcups  . . . . . . . yes
    apple_sensors . . . . no
    aquaero . . . . . . . no
    ascent  . . . . . . . no
    barometer . . . . . . no
    battery . . . . . . . yes
    bind  . . . . . . . . no
    ceph  . . . . . . . . no
    cgroups . . . . . . . yes
    conntrack . . . . . . yes
    contextswitch . . . . yes
    cpu . . . . . . . . . yes
    cpufreq . . . . . . . yes
    csv . . . . . . . . . yes
    curl  . . . . . . . . no
    curl_json . . . . . . no
    curl_xml  . . . . . . no
    dbi . . . . . . . . . no
    df  . . . . . . . . . yes
    disk  . . . . . . . . yes
    dns . . . . . . . . . no
    drbd  . . . . . . . . yes
    email . . . . . . . . yes
    entropy . . . . . . . yes
    ethstat . . . . . . . yes
    exec  . . . . . . . . yes
    fhcount . . . . . . . yes
    filecount . . . . . . yes
    fscache . . . . . . . yes
    gmond . . . . . . . . no
    hddtemp . . . . . . . yes
    interface . . . . . . yes
    ipc . . . . . . . . . yes
    ipmi  . . . . . . . . no
    iptables  . . . . . . no
    ipvs  . . . . . . . . yes
    irq . . . . . . . . . yes
    java  . . . . . . . . no
    load  . . . . . . . . yes
    logfile . . . . . . . yes
    log_logstash  . . . . no
    lpar  . . . . . . . . no
    lvm . . . . . . . . . no
    madwifi . . . . . . . yes
    match_empty_counter . yes
    match_hashed  . . . . yes
    match_regex . . . . . yes
    match_timediff  . . . yes
    match_value . . . . . yes
    mbmon . . . . . . . . yes
    md  . . . . . . . . . yes
    memcachec . . . . . . no
    memcached . . . . . . yes
    memory  . . . . . . . yes
    mic . . . . . . . . . no
    modbus  . . . . . . . no
    multimeter  . . . . . yes
    mysql . . . . . . . . yes
    netapp  . . . . . . . no
    netlink . . . . . . . no
    network . . . . . . . yes
    nfs . . . . . . . . . yes
    nginx . . . . . . . . no
    notify_desktop  . . . no
    notify_email  . . . . no
    ntpd  . . . . . . . . yes
    numa  . . . . . . . . yes
    nut . . . . . . . . . no
    olsrd . . . . . . . . yes
    onewire . . . . . . . no
    openldap  . . . . . . no
    openvpn . . . . . . . yes
    oracle  . . . . . . . no
    perl  . . . . . . . . yes
    pf  . . . . . . . . . no
    pinba . . . . . . . . no
    ping  . . . . . . . . no (dependency error)
    postgresql  . . . . . no
    powerdns  . . . . . . yes
    processes . . . . . . yes
    protocols . . . . . . yes
    python  . . . . . . . yes
    redis . . . . . . . . no (dependency error)
    routeros  . . . . . . no
    rrdcached . . . . . . no
    rrdtool . . . . . . . no
    sensors . . . . . . . no
    serial  . . . . . . . yes
    sigrok  . . . . . . . no
    smart . . . . . . . . no
    snmp  . . . . . . . . no
    statsd  . . . . . . . yes
    swap  . . . . . . . . yes
    syslog  . . . . . . . yes
    table . . . . . . . . yes
    tail_csv  . . . . . . yes
    tail  . . . . . . . . yes
    tape  . . . . . . . . no
    target_notification . yes
    target_replace  . . . yes
    target_scale  . . . . yes
    target_set  . . . . . yes
    target_v5upgrade  . . yes
    tcpconns  . . . . . . yes
    teamspeak2  . . . . . yes
    ted . . . . . . . . . yes
    thermal . . . . . . . yes
    threshold . . . . . . yes
    tokyotyrant . . . . . no
    turbostat . . . . . . yes
    unixsock  . . . . . . yes
    uptime  . . . . . . . yes
    users . . . . . . . . yes
    uuid  . . . . . . . . yes
    varnish . . . . . . . no
    virt  . . . . . . . . no
    vmem  . . . . . . . . yes
    vserver . . . . . . . yes
    wireless  . . . . . . yes
    write_graphite  . . . yes
    write_http  . . . . . no
    write_kafka . . . . . no
    write_log . . . . . . yes
    write_mongodb . . . . no
    write_redis . . . . . no
    write_riemann . . . . no
    write_sensu . . . . . yes
    write_tsdb  . . . . . yes
    xmms  . . . . . . . . no
    zfs_arc . . . . . . . yes
    zookeeper . . . . . . yes

configure: error: "Some plugins are missing dependencies - see the summary above for details"

其中
.
.
.
libhiredis  . . . . . no (hiredis.h not found)
.
.
.
redis . . . . . . . . no (dependency error)
.
.
.
write_redis . . . . . no


表明redis插件安装失败

HiredisRedis开源库对C语言接口的API开发库。

初学者很容易搞混,redis-server redis-client都是应用程序,跟开发接口不相关。

Hiredis 在官网 http://redis.io/clients 中有说明This is the official C client. Support for the whole command set, pipelining, event driven programming.

下载地址为https://github.com/redis/hiredis

Linux平台下载hiredis开发包,解压 

在命令行中 cd进入解压后的文件夹执行 Make 这样C客户端编译完毕。

接下来也是最关键的 配置。

可以手动配置 将对应.h.so .a等文件拷贝到/usr/local/lib /user/local/include对应文件夹

或者直接执行自动配置  make install  建议直接使用此方法。

至此hiredis开发包配置完毕

git clone https://github.com/redis/hiredis.git
cd hiredis
make install
再安装collectd:
./configure --enable-cpu  --enable-df --enable-disk --enable-interface --enable-load --enable-memory --enable-ping --enable-swap --enable-users --enable-uptime --enable-redis

安装成功。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

0X码上链

你的鼓将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值