当前位置:网站首页>Cacti monitors redis implementation process
Cacti monitors redis implementation process
2022-07-03 11:50:00 【Brother Xing plays with the clouds】
Cacti It's a set of bases PHP,MySQL,SNMP And RRDTool A graphic analysis tool for network traffic monitoring . It is widely used for The server In operation and maintenance monitoring ,Cacti Provides a plug-in management , Just write a specific template as required , Then you can monitor the traffic of any service . This article is to introduce two templates , Namely MongoDB and Redis Of Cacti Templates , Use it , You can treat your MongoDB and Redis Service traffic monitoring .
1, upgrade Python, At this time, if it is the system default python edition , The following errors will occur
python setup.py install
Traceback (most recent call last):
File "setup.py", line 3, in ?
from redis import __version__
File "/usr/local/src/redis-2.4.11/redis/__init__.py", line 1, in ?
from redis.client import Redis, StrictRedis
File "/usr/local/src/redis-2.4.11/redis/client.py", line 240
with self.pipeline(True, shard_hint) as pipe:
^
SyntaxError: invalid syntax
2, install python, First configure python Environmental Science , download python Source code
wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2
$ tar –jxvf Python-2.5.2.tar.bz2
$ cd Python-2.5.2
$ ./configure
$ make
$ make install
[[email protected] Python-2.5.2]# python
Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Version still 2.4.3 Of , The solution is as follows :
#cd /usr/bin
#ll |grep python // Look in the directory python
#rm -rf python
Just make a soft connection again
[[email protected] Python-2.5.2]# ln -s /usr/local/bin/python /usr/bin/python
[[email protected] Python-2.5.2]#
[[email protected] Python-2.5.2]# python
Python 2.5.2 (r252:60911, Aug 4 2014, 14:43:36)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
3, Then download redis The template of
wget http://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-1.1.8.tar.gz
Configure monitoring script
mongodb or redis What you need to monitor is what you download in the directory better-cacti-templates-1.1.8\scripts Under the
ss_get_by_ssh.php This script This script needs to be placed in cacti The service side .
If you cacti It's loading /var/www/html/cacti/ Under the table of contents .
Put the file under it scripts Under the table of contents . Don't forget to look at permissions . Have the right to execute .
Then modify the file . Mainly modify the options , In about 40 That's ok .
# ============================================================================
$ssh_user = 'root'; # SSH username
$ssh_port = 22; # SSH port
$ssh_iden = '-i /root/.ssh/id_rsa'; # SSH identity
## Modify according to your configuration , Yours ssh Connect the user , And the location of the authentication private key .
It's time to 50 That's ok , You can also modify its default port to detect ( If redis It is not the normal default port startup. You need to modify these ).
$redis_port = 6379; # Which port redis listens on
4, Import template , Template directory is better-cacti-templates-1.1.8\templates
stay cacti Interface import interface , establish redis The server Of Graph, As shown below :
5, To view the Graph design sketch , As shown below :
边栏推荐
猜你喜欢
Cadence background color setting
The tutor put forward 20 pieces of advice to help graduate students successfully complete their studies: first, don't plan to take a vacation
vulnhub之cereal
Yintai department store ignites the city's "night economy"
vulnhub之momentum
《剑指offer 03》数组中重复的数字
Gut | Yu Jun group of the Chinese University of Hong Kong revealed that smoking changes intestinal flora and promotes colorectal cancer (do not smoke)
软考中级软件设计师该怎么备考
错排问题 (抽奖,发邮件)
836. 合并集合(DAY 63)并查集
随机推荐
previous permutation lintcode51
鸿蒙第四次培训
836. 合并集合(DAY 63)并查集
Hongmeng fourth training
R语言使用gridExtra包的grid.arrange函数将ggplot2包的多个可视化图像横向组合起来,ncol参数自定义组合图列数、nrow参数自定义组合图行数
Use typora to draw flow chart, sequence diagram, sequence diagram, Gantt chart, etc. for detailed explanation
836. Merge sets (day 63) and search sets
Excel快速跨表复制粘贴
小鹏 P7 撞护栏安全气囊未弹出,官方回应称撞击力度未达到弹出要求
AI模型看看视频,就学会了玩《我的世界》:砍树、造箱子、制作石镐样样不差...
Kubernetes 三打探针及探针方式
外插散点数据
The excel table is transferred to word, and the table does not exceed the edge paper range
DS90UB949
Vulnhub geminiinc
vulnhub之narak
typeScript
Gut | Yu Jun group of the Chinese University of Hong Kong revealed that smoking changes intestinal flora and promotes colorectal cancer (do not smoke)
2022年中南大学夏令营面试经验
phpcms 提示信息頁面跳轉showmessage