Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6937135
  • 博文数量: 637
  • 博客积分: 10265
  • 博客等级: 上将
  • 技术积分: 6165
  • 用 户 组: 普通用户
  • 注册时间: 2004-12-12 22:00
文章分类

全部博文(637)

文章存档

2011年(1)

2010年(1)

2009年(3)

2008年(12)

2007年(44)

2006年(156)

2005年(419)

2004年(1)

分类: LINUX

2006-02-09 21:19:46

可执行脚本的输出可以是一个变量或者多个变量。
一个变量的输出结果格式:
如:
82

多个变量的输出结果格式:
: : ... :
如:
1min:0.40 5min:0.32 10min:0.01
Lets say that I write a script that outputs the 1, 5, and 10 minute load average of a Unix machine. In Cacti, I name the output fields '1min', '5min', and '10min', respectively. Based on these two things, the output of the script should look like the following:

把可执行脚本放到:/scripts/ 目录下。

创建一个"data input methods",在console下的Collection Methods下选择Data input methods,然后点右上角的Add按钮。
Name 下输入 Data inputmethods的名字
Input Type 数据的类型: Scripts/Command
Input String 脚本地址: /scripts/get_router_stats.sh

为执行脚本传递的变量,在Input Fileds添加input变量及其描述。

Output Fileds 输出变量名,注意和script相对应(个数、名字都要求对应)。

然后创建Data Templates ,添加Data Templates,注意Data input methods选择上面创建的method,在Data Source Item中添加相应个Data source(注意修改最大值),如果数据中可能出现负数,那么Minimum Value一定要修改成负数(且可能的最大负值-100)

最后创建Graph Templates,比较简单的方法就是把一个现成的templates复制一份,注意修改Graph item中的各个Item的Data Source。Auto Scale Options选择 Use --alt-autoscale ,Lower Limit选择最大的负值。

最后创建图形了。

先简单叙述一下,日后有空详细描述
阅读(4519) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~