简体   繁体   English

我正在使用带有石墨的Collected(C插件),如何将图形合并在一起(CPU,网络等)?

[英]I am using collectd (c plugin) with graphite, how do I merge the graphs together (cpu, network,etc)?

I am using collectd (c plugin) with graphite, and all the info like eth0, eth1 cpu0, cpu1, cpu2 etc are saved in graphite as one graph. 我正在使用带有石墨的collectd(c插件),所有信息eth0,eth1 cpu0,cpu1,cpu2等都保存在石墨中作为一张图。

How do I merge the graphs together, like all the CPU's? 如何像所有CPU一样将图形合并在一起? Its somehow not very intuitive~ 有点不直观〜

Thank you 谢谢

It would be more helpful if you indicate the actual metric name. 如果您指定实际的度量标准名称,将会更有帮助。 Elaborate what you mean bt- saved in graphite as one graph. saved in graphite as one graph.详细说明您将bt- saved in graphite as one graph.意思saved in graphite as one graph. .

Assuming your metrics are as follows(default behavior)- 假设您的指标如下(默认行为)-

data.server1.eth0 data.server1.eth0

data.server1.eth1 data.server1.eth1

data.server1.cpu0 data.server1.cpu0

data.server1.cpu1 data.server1.cpu1

data.server1.cpu2 data.server1.cpu2

data.server1.cpu3 data.server1.cpu3

and

data.server2.cpu0 data.server2.cpu0

data.server1.cpu1 data.server1.cpu1

data.server1.cpu2 data.server1.cpu2

data.server1.cpu3 data.server1.cpu3

You can 'see' the graphs in 3 ways- 您可以通过3种方式“查看”图表-

  1. Graphite webapp (default <ip> of your server) Graphite Webapp(服务器的默认<ip>
  2. Graphite dashboard ( <ip>/dashboard ) 石墨仪表板( <ip>/dashboard
  3. Render URL-API ( <ip>/render? ) 渲染URL-API<ip>/render?

You can go to the graphite webapp and try to add the metric using the GUI- data.server1.* - If you want all metrics of that server. 您可以转到石墨data.server1.*应用程序,然后尝试使用data.server1.* - data.server1.*添加度量标准data.server1.*如果需要该服务器的所有度量标准。 data.*.eth* - If you want all NICs on all servers. data.*.eth* -如果要在所有服务器上使用所有NIC。

I assume you are aware of wildcards. 我认为您知道通配符。 All Python (hence Perl) style wildcards are acceptable. 所有Python(因此,Perl)样式的通配符都是可接受的。

Saving graphs to graphite is as straightforward as any GUI, but only authenticated 'graphite users' can save user-graphs. 将图形保存到石墨就像任何GUI一样简单,但是只有经过身份验证的“石墨用户”才能保存用户图形。 You must have created a default root user while setting up graphite. 设置石墨时,您必须已创建默认的root用户。 The user in context here is the same as the django admin created during installation. 此处的上下文用户与安装期间创建的django管理员相同。

cd /opt/graphite/webapp/graphite/ cd / opt / graphite / webapp / graphite /

echo "from django.contrib.auth.models import User; User.objects.create_superuser('$GRAPHITE_USERNAME', '$GRAPHITE_EMAIL', '$GRAPHITE_PASSWORD')" | sudo python manage.py shell

With optimal settings and default setup, something like this will let you add more users to the same. 使用最佳设置和默认设置,类似的操作将使您可以向同一用户添加更多用户。 Technically, the authentication is done against django's db. 从技术上讲,身份验证是针对Django的数据库完成的。 After that you'd have to login at the top of the webapp. 之后,您必须登录Web应用程序的顶部。

<graphite_host>/account/login

Do restart carbon and apache after these, though. 不过,在这些之后,请重新启动碳粉和apache。 Once you're logged in, you will see little thumbnail of a 'save graph' icon on the top left corner of the graph. 登录后,您将在图表的左上角看到“保存图表”图标的小缩略图。 Once you've customized the graph, you can save it. 自定义图表后,就可以保存它。 To get back to the saved user graphs, you'll have to expand the sub-tree to the left, under the node 'User=graphs'. 要返回已保存的用户图,您必须在“ User = graphs”节点下向左扩展子树。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM