AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 763845
Accepted
w00t
w00t
Asked: 2016-03-16 05:16:25 +0800 CST2016-03-16 05:16:25 +0800 CST 2016-03-16 05:16:25 +0800 CST

聚合的 munin 图形文件为空

  • 772

我无法汇总我编写的一些自定义图表。我知道聚合是功能性的,因为我能够聚合默认插件,但我不确定我的有什么问题。

munin.conf:

[myapp;web-servers;0-1]
        address 1.2.3.4
        use_node_name yes
[myapp;web-servers;0-2]
        address 5.6.7.8
        use_node_name yes

[myapp;web-servers;Aggregated]
        update no

#does not work:
    node_aggregate.graph_args --base 1000 -l 0
    node_aggregate.graph_title Aggregated connects
    node_aggregate.conns.label conns
    node_aggregate.conns.sum myapp;web-servers;0-1:nodejs_numberOfConnects.conns myapp;web-servers;0-2:nodejs_numberOfConnects.conns


#works:
    node_aggregate.graph_title Aggregated cpu
    node_aggregate.cpu.label cpu.user
    node_aggregate.cpu.sum myapp;web-servers;0-1:cpu.user myapp;web-servers;0-2:cpu.user

我的插件看起来像这样:

if [[ "$PARAM" == "numberOfConnects" ]]; then
        echo "graph_title Active Connects";
        echo "graph_info Active Connects";
        echo "graph_vlabel Connections";
        echo "$PARAM.label conns";
        echo "$PARAM.type GAUGE";
        echo "$PARAM.colour 0927EB"
        exit 0;
elif ...
fi
echo $PARAM.value 15

出于测试目的,我可以硬编码“$PARAM.value 15”。然后我可以做
munin-run --servicedir /etc/munin/plugins nodejs_numberOfConnects这将返回numberOfConnects.value 15

我得到的错误是:

==> /var/log/munin/munin-graph.log <==
2016/03/15 13:57:01 [ERROR] filename is empty for $VAR1 = {
  '#%#name' => 'z1_0',
  'cdef' => 'z1_0,UN,0,z1_0,IF',
  'graph' => 'no',
  'label' => 'z1_0'
};
, myapp;web-servers;0-1:nodejs_numberOfConnects.conns

2016/03/15 13:57:01 [ERROR] filename is empty for $VAR1 = {
  '#%#name' => 'z1_1',
  'cdef' => 'z1_1,UN,0,z1_1,IF,z1_0,ADDNAN',
  'colour' => undef,
  'draw' => undef,
  'graph' => 'yes',
  'label' => 'conns'
};
, myapp;web-servers;0-2:nodejs_numberOfConnects.conns
munin
  • 2 2 个回答
  • 335 Views

2 个回答

  • Voted
  1. w00t
    2016-03-25T09:56:49+08:002016-03-25T09:56:49+08:00

    经过多次调试,我意识到我错误地使用了标签的名称而不是值的名称。

    node_aggregate.conns.sum myapp;web-servers;0-1:nodejs_numberOfConnects.conns myapp;web-servers;0-2:nodejs_numberOfConnects.conns
    

    需要是

    node_aggregate.conns.sum myapp;web-servers;0-1:nodejs_numberOfConnects.numberOfConnects myapp;web-servers;0-2:nodejs_numberOfConnects.numberOfConnects
    

    因为

    if [[ "$PARAM" == "numberOfConnects" ]]; then
    [...]
    echo $PARAM.value 15
    

    换句话说,在我的情况下,服务器行等于:
    $arbitraryname1.arbitraryname2.sum $clientname;$hostgroup;$hostname:$pluginname.$valuename

    cpu我也被使用以下语法的示例所抛弃:
    myapp;web-servers;0-1:cpu.user但那是因为它的值名称实际上与标签名称一致!

    • 1
  2. Best Answer
    pepsiMIN
    2016-03-25T09:34:53+08:002016-03-25T09:34:53+08:00

    您正在尝试将conns作为导出值传递,但这实际上是numberOfConnects

    node_aggregate.nodejs_numberOfConnects.label conns(or whatever)
    node_aggregate.nodejs_numberOfConnects.sum \ 
        myapp;web-servers;0-1:nodejs_numberOfConnects.numberOfConnects \ 
        myapp;web-servers;0-2:nodejs_numberOfConnects.numberOfConnects
    
    • 0

相关问题

  • munin 中的 irqstat 图代表什么?

  • 什么是 RES 中断(来自 Munin)

  • Munin 和 Mac OSX 的 CPU(或内存/等)插件?

  • 在 RHEL 上安装 Munin 以跟踪多台服务器的性能需要哪些步骤

  • 有间歇性客户的穆宁

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve