Get the App
SLTechnology News&Howtos  ›  Servers  › 

Open-falcon + grafana Monitoring redis

Shulou Source: shulou.com Published: 2022-06-02 18:07:23 10月03日 Update

Open-falcon recommends using the collection script redis-monitor or redismon, where redis-monitor supports Sentinel monitoring, while redismon does not support Sentinel, but the former does not support friendly monitoring of some fields, so I use redismon here.

First, prepare the environment

Operating system: Linux

Python > 2.6

PyYAML > 3.10

Redis-py > 2.10

Python-requests > 0.11

Open-falcon still feels that few people use it. The last time I modified redismon on GitHub was four years ago, so I tried to run it with python3 for the first time, and something went wrong. But the version of my online server python is 2.6, which does not meet the requirement that it is greater than 2.6, so install version 2.7 of python first.

Cd / usr/local/src/

Tar xf Python-2.7.11.tar.xz

Cd Python-2.7.11

. / configure-- prefix=/usr/local/python27

Make & & make install

Cd / usr/local/python27/

Bin/python get-pip.py

Bin/python-m pip-V

Bin/python-m pip install PyYAML

Bin/python-m pip install redis

Bin/python-m pip install requests

II. Deploy redismon

1. Extract the directory to / path/to/redismon

2 configure the Redis multi-instance information of the current server. / path/to/redismon/conf/redismon.conf records one instance per line: cluster name, password, port

{cluster_name: cluster_1, password:', port: 6379} the cluster_name here will be added after metric, for example: aof_enabled/redis=16379__cluster_1

3 configure crontab, modify redismon installation path; cp redismon_cron / etc/cron.d/ in redismon_cron file

4 check the log file / path/to/redismon/log/redismon.log. If there is no abnormal information, the collection is normal. After a few minutes, you can view the redis metric from the dashboard of open-falcon.

5 endpoint defaults to hostname

III. Grafana+open-falcon

Grafana has a plug-in for open-falcon, grafana open-falcon. But it hasn't been maintained for three or four years. Only grafana5.4 version is supported, so download and install a version 5. 4 grafana.

Tar-zxf grafana-5.4.0.linux-amd64.tar.gz

Cd grafana-5.4.0/data/plugins/

Git clone https://github.com/open-falcon/grafana-openfalcon-datasource

Cat conf/defaults.ini

Nohup bin/grafana-server & > grafana.log &

Add the data source, because the open-falcon here is version 0.2 and there is no query component, so the url to be configured here is the http listening port of api: / api/v1/grafana

Tags: Version support configuration monitoring information sentry instance file server port service operating system field password year ago sense plug-in data source data source log Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS Apple Docker MariaDB