返回顶部
首页 > 资讯 > 精选 >Ubuntu怎么配置Munin
  • 598
分享到

Ubuntu怎么配置Munin

2023-07-04 15:07:07 598人浏览 安东尼
摘要

这篇文章主要讲解了“ubuntu怎么配置Munin”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Ubuntu怎么配置Munin”吧!1. 添加apt源123sudo add–apt–repo

这篇文章主要讲解了“ubuntu怎么配置Munin”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Ubuntu怎么配置Munin”吧!

1. 添加apt源

1

2

3

sudo add–apt–repository ppa:tuxpoldo/munin

sudo apt–get update

sudo apt–get dist–upgrade

可能要导入key,方法如下

1

sudo apt–key adv —keyserver keyserver.ubuntu.com —recv–keys KEY_ID

2. 创建依赖关系和安装

1

2

sudo apt–get build–dep munin

sudo apt–get install munin munin–node

munin主节点需要安装munin和munin-node,被监控节点只需要安装munin-node。

3. 配置munin.conf

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

# Example configuration file for Munin, generated by ‘make build’

# The next three variables specifies where the location of the RRD

# databases, the html output, logs and the lock/pid files.  They all

# must be writable by the user running munin-cron.  They are all

# defaulted to the values you see here.

#

#dbdir  /var/lib/munin

#htmldir /var/cache/munin/www

#logdir /var/log/munin

#rundir  /var/run/munin

# Where to look for the HTML templates

#

#tmpldir        /etc/munin/templates

# Where to look for the static www files

#

#staticdir /etc/munin/static

# temporary cgi files are here. note that it has to be writable by

# the cgi user (usually nobody or Httpd).

#

# cgitmpdir /var/lib/munin/cgi-tmp

# (Exactly one) directory to include all files from.

includedir /etc/munin/munin–conf.d

# You can choose the time reference for “DERIVE” like graphs, and show

# “per minute”, “per hour” values instead of the default “per second”

#

#graph_period second

# Graphics files are generated either via cron or by a CGI process.

# See http://munin-monitoring.org/wiki/CgiHowto2 for more

# documentation.

# Since 2.0, munin-graph has been rewritten to use the cgi code.

# It is single threaded *by design* now.

#

#graph_strategy cron

# munin-cgi-graph is invoked by the WEB server up to very many times at the

# same time.  This is not optimal since it results in high CPU and memory

# consumption to the degree that the system can thrash.  Again the default is

# 6.  Most likely the optimal number for max_cgi_graph_jobs is the same as

# max_graph_jobs.

#

#munin_cgi_graph_jobs 6

# If the automatic CGI url is wrong for your system override it here:

#

#cgiurl_graph /munin-cgi/munin-cgi-graph

# max_size_x and max_size_y are the max size of images in pixel.

# Default is 4000. Do not make it too large otherwise RRD might use all

# RAM to generate the images.

#

#max_size_x 4000

#max_size_y 4000

# HTML files are nORMally generated by munin-html, no matter if the

# files are used or not. You can change this to on-demand generation

# by following the instructions in http://munin-monitoring.org/wiki/CgiHowto2

#

# Notes:

# – moving to CGI for HTML means you cannot have graph generated by cron.

# – cgi html has some bugs, mostly you still have to launch munin-html by hand

#

#html_strategy cron

# munin-update runs in parallel.

#

# The default max number of processes is 16, and is probably ok for you.

#

# If set too high, it might hit some process/ram/filedesc limits.

# If set too low, munin-update might take more than 5 min.

#

# If you want munin-update to not be parallel set it to 0.

#

#max_processes 16

# RRD updates are per default, performed directly on the rrd files.

# To reduce IO and enable the use of the rrdcached, uncomment it and set it to

# the location of the Socket that rrdcached uses.

#

#rrdcached_socket /var/run/rrdcached.sock

# Drop somejuser@fnord.comm and anotheruser@trustauth.cn an email everytime

# something changes (OK -> WARNING, CRITICAL -> OK, etc)

#contact.sometrustauth.cnmand mail -s “Munin notification” somejuser@fnord.comm

#contact.anothertrustauth.cnmand mail -s “Munin notification” anotheruser@trustauth.cn

contact.ttlsa_monitor.command /usr/local/bin/sendEmail  –f support@ttlsa.com –s smtp.exmail.qq.com –xu support@ttlsa.com –xp ttlsa.com –o message–content–type=html  –o message–charset=utf8  –t monitor@ttlsa.com \

        –u “* ${if:cfields PROBLEM }${if:wfields PROBLEM }${if:fofields RECOVERY } – ${var:host}/${var:graph_title} is ${if:cfields CRITICAL}${if:wfields WARNING}${if:fofields OK} *” \

        –m “Group: ${var:group}<p> Host: ${var:host}<p> \

            Warngin: ${loop<,>:wfields – ${var:value} outside range [${var:wrange}] (${var:label})}<p> \

                Critical: ${loop<,>:cfields – ${var:value} outside range [${var:crange}] (${var:label})}<p> \

                OK: ${ loop<,>:fofields – ${var:value} = ${var:label} }” \

         –l /tmp/mail.log

contact.ttlsa_monitor.always_send warning critical

#

# For those with NagiOS, the following might come in handy. In addition,

# the services must be defined in the Nagios server as well.

#contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf

# Alert log

contact.log.command tee –a /var/log/munin/alert.log

# a simple host tree

[ttlsa;web1]

    address X.X.X.X

    use_node_name yes

    contacts ttlsa_monitor

4. 配置munin-node.conf

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

#

# Example config-file for munin-node

#

log_level 4

log_file /var/log/munin/munin–node.log

pid_file /var/run/munin/munin–node.pid

background 1

setsid 1

user root

group root

# This is the timeout for the whole transaction.

# Units are in sec. Default is 15 min

#

# global_timeout 900

# This is the timeout for each plugin.

# Units are in sec. Default is 1 min

#

# timeout 60

# Regexps for files to ignore

ignore_file [\#~]$

ignore_file DEADJOE$

ignore_file \.bak$

ignore_file %$

ignore_file \.dpkg–(tmp|new|old|dist)$

ignore_file \.rpm(save|new)$

ignore_file \.pod$

# Set this if the client doesn’t report the correct hostname when

# telnetting to trustauth.cn, port 4949

#

#host_name trustauth.cn.localdomain

host_name web1

# A list of addresses that are allowed to connect.  This must be a

# regular expression, since Net::Server does not understand CIDR-style

# network notation unless the perl module Net::CIDR is installed.  You

# may repeat the allow line as many times as you’d like

allow ^127\.0\.0\.1$

allow ^::1$

allow ^X\.X\.X\.X$    #munin master ip address

# If you have installed the Net::CIDR perl module, you can use one or more

# cidr_allow and cidr_deny address/mask patterns.  A connecting client must

# match any cidr_allow, and not match any cidr_deny.  Note that a netmask

# *must* be provided, even if it’s /32

#

# Example:

#

# cidr_allow 127.0.0.1/32

# cidr_allow 192.0.2.0/24

# cidr_deny  192.0.2.42/32

# Which address to bind to;

host N.N.N.N

# host 127.0.0.1

# And which port

port 4949

5. 插件生效

1

sudo munin–node–configure —shell —families=contrib,auto | sh –x

或者,自己创建软连接即可。

6. 配置Nginx

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

server {

        listen 80;

        server_name monitor.ttlsa.com;

        access_log  /data/logs/access–monitor.log;

        error_log /data/logs/error–monitor.log;

        location ^~ /munin–cgi/munin–cgi–graph/ {

                fastcgi_split_path_info ^(/munin–cgi/munin–cgi–graph)(.*);

                fastcgi_param PATH_INFO $fastcgi_path_info;

                fastcgi_pass unix:/var/run/munin/fcgi–graph.sock;

                include fastcgi_params;

        }

        location /munin/static/ {

                alias /etc/munin/static/;

        }

        location /munin {

                alias /var/cache/munin/www/;

                auth_basic “mechat munin”;

                auth_basic_user_file “/etc/munin/munin-htpasswd”;    

        }

        location / {

                rewrite ^/$ munin/ redirect; break;

        }

}

需要安装spawn-fcgi,并启动下面的进程。

1

spawn–fcgi –s /var/run/munin/fcgi–graph.sock –U www–data –u munin –g munin /usr/lib/munin/cgi/munin–cgi–graph

感谢各位的阅读,以上就是“Ubuntu怎么配置Munin”的内容了,经过本文的学习后,相信大家对Ubuntu怎么配置Munin这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!

--结束END--

本文标题: Ubuntu怎么配置Munin

本文链接: https://lsjlt.com/news/346322.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
  • Ubuntu怎么配置Munin
    这篇文章主要讲解了“Ubuntu怎么配置Munin”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Ubuntu怎么配置Munin”吧!1. 添加apt源123sudo add–apt–repo...
    99+
    2023-07-04
  • ubuntu 中怎么配置supervisor
    这篇文章给大家介绍ubuntu 中怎么配置supervisor,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。1,安装python,supervisor# apt-get install p...
    99+
    2023-06-05
  • Ubuntu中怎么配置ftp
    Ubuntu中怎么配置ftp,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。 ftp服务器安装与配置1. ftp服务端的安装如果之前配置过ftp服务器的还是之后配置的服...
    99+
    2023-06-05
  • Ubuntu 中怎么配置mysql
    本篇文章为大家展示了Ubuntu 中怎么配置mysql,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。 在master上建立一个专门用来做复制的用户:grant replication slave o...
    99+
    2023-06-16
  • Ubuntu中怎么配置maven
    这篇“Ubuntu中怎么配置maven”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Ubuntu中怎么配置maven”文章吧...
    99+
    2023-07-04
  • 怎么在Ubuntu上配置Node.js
    这篇文章主要讲解了“怎么在Ubuntu上配置Node.js”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么在Ubuntu上配置Node.js”吧!一、基础系统安装Node 在 Linux,...
    99+
    2023-06-16
  • Ubuntu系统怎么配置DNS
    这篇文章主要介绍“Ubuntu系统怎么配置DNS”,在日常操作中,相信很多人在Ubuntu系统怎么配置DNS问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Ubuntu系统怎么配置DNS”的疑惑有所帮助!接下来...
    99+
    2023-06-16
  • Ubuntu配置文件怎么用
    小编给大家分享一下Ubuntu配置文件怎么用,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!Ubuntu 配置文件系统初始化/etc/timezone 时...
    99+
    2023-06-16
  • Ubuntu怎么安装配置Memcached
    本篇内容介绍了“Ubuntu怎么安装配置Memcached”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!Memcached 是一个高性能的分...
    99+
    2023-06-27
  • ubuntu安装eclipse怎么配置
    1. 下载eclipse安装包并解压缩到指定目录;2. 安装JDK,并配置环境变量;3. 打开eclipse,在“Window”菜单...
    99+
    2023-06-03
    ubuntu安装eclipse ubuntu eclipse
  • Ubuntu怎么配置lamp环境
    这篇“Ubuntu怎么配置lamp环境”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Ubuntu怎么配置lamp环境”文章吧...
    99+
    2023-07-04
  • ubuntu中Python3.5怎么配置OpenCV3.2
    这篇文章主要介绍了ubuntu中Python3.5怎么配置OpenCV3.2的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇ubuntu中Python3.5怎么配置OpenCV3.2文章都会有所收获,下面我们一起...
    99+
    2023-07-04
  • ubuntu中怎么安装配置MYSQL
    今天就跟大家聊聊有关ubuntu中怎么安装配置MYSQL,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。配置MySQL注意,MySQL缺省是只允许本地...
    99+
    2024-04-02
  • Ubuntu中怎么配置Python版本
    Ubuntu中怎么配置Python版本,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。首先查看系统内有哪些版本的Pythonls /usr/bin/python查看...
    99+
    2023-06-05
  • Ubuntu中怎么配置IP地址
    这期内容当中小编将会给大家带来有关Ubuntu中怎么配置IP地址,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。一、使用命令设置ubuntu的ip地址 1.修改配置文件blacklist.conf禁用IPV...
    99+
    2023-06-13
  • Ubuntu中怎么配置Server网络
    本篇文章为大家展示了Ubuntu中怎么配置Server网络,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。0)虚拟机改成"桥接"模式.1)修改IP打开 /etc/network/i...
    99+
    2023-06-17
  • ubuntu怎么配置本地apt源
    要配置本地APT源,您可以按照以下步骤进行操作:1. 打开终端,以管理员身份运行以下命令来备份原始的APT源列表文件:```sudo...
    99+
    2023-09-29
    ubuntu
  • ubuntu怎么配置本地yum源
    要在Ubuntu上配置本地yum源,可以按照以下步骤进行操作:1. 在终端中以root用户身份登录。2. 创建一个新目录来存储yum...
    99+
    2023-09-06
    ubuntu yum
  • Ubuntu下怎么安装配置MariaDB
    本篇内容主要讲解“Ubuntu下怎么安装配置MariaDB”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Ubuntu下怎么安装配置MariaDB”吧!MariaDB数据库管理系统是 MySQL ...
    99+
    2023-06-28
  • Ubuntu中怎么安装配置FTP
    今天小编给大家分享一下Ubuntu中怎么安装配置FTP的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。FTP(File Tra...
    99+
    2023-06-27
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作