collectd

Adding custom jmx metrics to google cloud monitoring collectd configuration

∥☆過路亽.° 提交于 2021-02-11 15:19:20
问题 I've added the JVM Monitoring plugin as described here That's all working great and I can, but now I'd like to add more JMX metrics. e.g. MemoryPool specific counters So I've added this config to /opt/stackdriver/collectd/etc/collectd.d/jvm-sun-hotspot.conf <MBean "jvm_localhost_MemoryPool"> ObjectName "java.lang:type=MemoryPool,name=*" InstanceFrom "name" <Value> Type "gauge" InstancePrefix "memorypool-usage_used" Table false Attribute "Usage.used" </Value> </MBean> and Collect "jvm

Adding custom jmx metrics to google cloud monitoring collectd configuration

蓝咒 提交于 2021-02-11 15:16:45
问题 I've added the JVM Monitoring plugin as described here That's all working great and I can, but now I'd like to add more JMX metrics. e.g. MemoryPool specific counters So I've added this config to /opt/stackdriver/collectd/etc/collectd.d/jvm-sun-hotspot.conf <MBean "jvm_localhost_MemoryPool"> ObjectName "java.lang:type=MemoryPool,name=*" InstanceFrom "name" <Value> Type "gauge" InstancePrefix "memorypool-usage_used" Table false Attribute "Usage.used" </Value> </MBean> and Collect "jvm

Export custom collectd PostgreSQL metrics to GCP Stackdriver Monitoring

江枫思渺然 提交于 2021-01-27 17:48:44
问题 Background I'm trying to export PostgreSQL replication delay by adding a custom <Query> statement to my PostgreSQL config (original config from Stackdriver PostgreSQL Plugin) in stackdriver-agents collectd configuration directory. /opt/stackdriver/collectd/etc/postgresql.conf : # This is the monitoring configuration for PostgreSQL. # Make sure the statistics collector is enabled in your PostgreSQL configuration. # NOTE: This configuration needs to be hand-edited in order to work. # Look for

31.Docker 服务端防护

廉价感情. 提交于 2020-09-30 15:45:34
Docker 服务端防护 运行一个容器或应用程序的核心是通过 Docker 服务端。Docker 服务的运行目前需要 root 权限,因此其安全性十分关键。 首先,确保只有可信的用户才可以访问 Docker 服务。Docker 允许用户在主机和容器间共享文件夹,同时不需要限制容器的访问权限,这就容易让容器突破资源限制。例如,恶意用户启动容器的时候将主机的根目录 / 映射到容器的 /host 目录中,那么容器理论上就可以对主机的文件系统进行任意修改了。这听起来很疯狂?但是事实上几乎所有虚拟化系统都允许类似的资源共享,而没法禁止用户共享主机根文件系统到虚拟机系统。 这将会造成很严重的安全后果。因此,当提供容器创建服务时(例如通过一个 web 服务器),要更加注意进行参数的安全检查,防止恶意的用户用特定参数来创建一些破坏性的容器 为了加强对服务端的保护,Docker 的 REST API(客户端用来跟服务端通信)在 0.5.2 之后使用本地的 Unix 套接字机制替代了原先绑定在 127.0.0.1 上的 TCP 套接字,因为后者容易遭受跨站脚本攻击。现在用户使用 Unix 权限检查来加强套接字的访问安全。 用户仍可以利用 HTTP 提供 REST API 访问。建议使用安全机制,确保只有可信的网络或 VPN,或证书保护机制(例如受保护的 stunnel 和 ssl 认证

influxdb sum first value metric of different series but same time interval for grafana graph

谁都会走 提交于 2019-12-22 09:56:27
问题 I am using influxdb grafana and collectd and i want to display memory usage graph. The collectd give me this metrics value for memory and save it in influxdb influxdb/memory/memory-buffered influxdb/memory/memory-cached influxdb/memory/memory-free influxdb/memory/memory-used i want to display in grafana graph the total memory so i need to sum the following metrics: memory_buffered + memory_cached + memory_free + memory_used How can I query this in influxdb or in grafana ? 回答1: I think this is

Config file finding unexpected $end, not sure why

橙三吉。 提交于 2019-12-13 02:37:22
问题 I am using a custom config of collectd and for some reason I keep getting a failure when I try and run the service. Originally I had everything in one big file, but to make changing configs easier I want to separate out the settings for various plugins and components. Collectd has a Include option to do exactly this. It seems to work, but when collectd tries to grab the external part of the program I get the following error: Parse error in file `/etc/collectd/collectd.conf.d/http.conf', line

salt mine for all network interfaces

北城以北 提交于 2019-12-12 01:22:43
问题 I'm having difficulty configuring collectd.conf using the interface plugin through salt . The collectd.conf expects a list of network interfaces to monitor like: <Plugin interface> Interface "em1" Interface "em2" </Plugin> I've worked out that I need to use a salt mine to pull the grains into the master - which is achieved through a pillar sls like the following: mine_functions: network.interfaces: [] and in my collectd.conf I have: <Plugin interface> {% for host, info in salt['mine.get']('*'

Collectd not pushing data to Logstash

北慕城南 提交于 2019-12-11 19:23:41
问题 my collectd setup is not pushing the logs to Logstash. Not sure what is the problem here. I have run the tcpdump on my collectd server. Even its not sending any request. I think, the problem may be on collectd. Someone have any idea on what is wrong here. Note : There is no block in server firewall . 回答1: I don't see anything immediately wrong with your collectd config, but try setting your Server tag to "localhost". That way you'll be sure to bind your server to your local interface. 回答2:

Collectd pushes the actual host system metrics to graphite instead of the docker container's restricted system metrics

て烟熏妆下的殇ゞ 提交于 2019-12-11 13:00:52
问题 I've a docker container deployed with a memory restriction of 300M and CPU-1 Core. When the container starts and my program executes, it is adhering the memory restriction to 300M and CPU to 1st CPU Core. However the collectd running inside the container pushes the metrics of Memory and Swap memory of the actual box ( 16 GB RAM ) instead of the restricted containers (300MB RAM). Is there any configuration that I'm missing? Docker run command: docker run -e CONTAINER_NAME='sample_docker

Collectd's curl_json plugin not sending data to graphite

痴心易碎 提交于 2019-12-10 10:46:48
问题 I've implemented curl_jason plugin to recolect and send LoadBalancer metrics to my RabbitMQ to be graphed in Graphite. Thing is, it's not sending any data, while it is working just fine (and great) with other plugins like memory, cpu, df root, network, etc. I've tried to troubleshoot following this suggestion: https://serverfault.com/questions/499378/collectd-stores-nan-instead-of-correct-value-in-ubuntu-12-04, but there're no issues coming out. Here's my collectd.conf: https://gist.github