Skip to content

Instantly share code, notes, and snippets.

@BrianHicks
Forked from TanyaCouture/spec.yml
Last active February 9, 2016 17:14
Show Gist options
  • Save BrianHicks/0376e904b77ded7c862b to your computer and use it in GitHub Desktop.
Save BrianHicks/0376e904b77ded7c862b to your computer and use it in GitHub Desktop.
mantl-collectd package
# collectd
FQDNLookup false
Interval 10
Include "/etc/collectd.d/"
TypesDB "/usr/share/collectd/types.db"
LoadPlugin "cpu"
LoadPlugin "disk"
LoadPlugin "df"
LoadPlugin "interface"
LoadPlugin "load"
LoadPlugin "memory"
LoadPlugin "network"
LoadPlugin "processes"
LoadPlugin "swap"
LoadPlugin "syslog"
LoadPlugin "uptime"
LoadPlugin "users"
<Plugin "cpu">
ReportByState true
ReportByCpu true
ValuesPercentage true
</Plugin>
<Plugin "memory">
ValuesPercentage true
</Plugin>
<Plugin "df">
FSType anon_inodefs
FSType bdev
FSType cgroup
FSType cpuset
FSType debugfs
FSType devpts
FSType devtmpfs
FSType ecryptfs
FSType fuse
FSType fusectl
FSType hugetlbfs
FSType mqueue
FSType nfs
FSType nfs4
FSType nfsd
FSType pipefs
FSType proc
FSType pstore
FSType ramfs
FSType rootfs
FSType rpc_pipefs
FSType securityfs
FSType sockfs
FSType sysfs
FSType tmpfs
FSType vboxsf
IgnoreSelected true
ReportByDevice false
ValuesAbsolute true
ReportInodes true
</Plugin>
<Plugin "interface">
Interface "/^veth/"
IgnoreSelected true
</Plugin>
<Plugin "syslog">
LogLevel "err"
</Plugin>
<Plugin "network">
Server "localhost" "25826"
</Plugin>
# EOF
---
name: mantl-collectd
version: 1.0.0
license: ASL 2.0
iteration: 1
vendor: Asteris
url: https://github.com/asteris-llc/mantl-packaging
description: Collectd integration with Mantl
type: rpm
depends:
- collectd
- libsemanage-python
targets:
- src: "{{.SpecRoot}}/collectd.conf"
dest: /etc/collectd.conf
config: true
# delete Hostname setting so that the hostname will be determined using the gethostname(2) system call
# mkdir -p /usr/share/collectd/plugins && chmod 0755 /usr/share/collectd/plugins
scripts:
before-install: |
mkdir -p /usr/share/collectd/plugins
sed -i '' "/collectd/a Hostname \"$(cat /etc/meta/id || hostname)\"" /etc/collectd.conf
# authorize collectd to make tcp connections
# start collectd on boot
after-install: |
setsebool -P collectd_tcp_network_connect 1
systemctl enable collectd 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment