Commit b66868bf authored by Sebastian Oeste's avatar Sebastian Oeste 🐧
Browse files

Add collectd.conf for pika collectd.

parent 7376af7a
#
# Config file for collectd(1).
# Please read collectd.conf(5) for a list of options.
# http://collectd.org/
#
##############################################################################
# Global settings for the daemon. #
##############################################################################
#HostnameReplace
TypesDB "CD_INST_PATH/share/collectd/types.db"
TypesDB "CUSTOM_TYPES_DIR/custom_types.db"
Interval 30
AlignRead true
ReadThreads 2
WriteThreads 1
##############################################################################
# Logging #
#----------------------------------------------------------------------------#
# Plugins which provide logging functions should be loaded first, so log #
# messages generated when loading or configuring other plugins can be #
# accessed. #
##############################################################################
LoadPlugin logfile
<Plugin logfile>
LogLevel info
File "/tmp/pika_collectd.log" #STDOUT
Timestamp true
PrintSeverity false
</Plugin>
##############################################################################
# LoadPlugin section #
##############################################################################
# plugin read functions are executed in reverse order?
<LoadPlugin memory>
Interval 30
</LoadPlugin>
<Plugin memory>
ValuesAbsolute true
ValuesPercentage false
</Plugin>
<LoadPlugin cpu>
Interval 30
AlignReadOffset 0.02
</LoadPlugin>
<Plugin cpu>
ReportByCpu true
ReportByState false
ValuesPercentage true
ReportNumCpu false
ReportGuestState false
SubtractGuestState false
</Plugin>
<LoadPlugin likwid>
Interval 60
AlignReadOffset 2
</LoadPlugin>
<Plugin likwid>
NormalizeFlops flops_any
AccessMode 0 # 1 for accessdaemon, 0 for direct access (only as root or with perf)
Mtime 29
Groups "pika_metrics_1,pika_metrics_2"
# by default metrics are reported per hardware thread
PerSocketMetrics "mem_bw,rapl_power"
MaxValues "ipc:10,flops:1e11,mem_bw:1e12"
PerCore true
Verbose 1
</Plugin> #likwid_end
<LoadPlugin python>
Interval 30
AlignReadOffset 0.08
</LoadPlugin>
<Plugin python>
ModulePath "CD_PLUGINS_PYTHON"
LogTraces true
Interactive false
Import "influx_write"
<Module influx_write>
#INFLUXHOST
#INFLUXPORT
#INFLUXUSER
#INFLUXPWD
#INFLUXDBNAME
batch_size 500
cache_size 4000
StoreRates true
PerCore "cpu:avg" #"likwid_cpu:sum" #plugin1:aggregate,plugin2.aggregate
ssl false
</Module>
Import "ib_bw"
<Module ib_bw>
#devices "/sys/class/infiniband/mlx4_0"
#directory "/sys/class/infiniband"
recheck_limit 1440
</Module>
Import "lustre_bw"
<Module lustre_bw>
#path "Lustre instance paths (comma separated)"
fsname_and_mount "*:/ws" # for all file systems AND mount points that end with '/ws'
recheck_limit 360 # every 3h
</Module>
</Plugin>
LoadPlugin unixsock
<Plugin unixsock>
SocketFile "/tmp/pika_collectd_unixsock" #socket for notifications
SocketGroup "root"
SocketPerms "0770"
DeleteSocket true
</Plugin>
#LoadPlugin write_log
##############################################################################
# Filter configuration #
##############################################################################
# Load required matches:
LoadPlugin match_regex
LoadPlugin target_scale
LoadPlugin target_set
PreCacheChain "pika"
<Chain "pika">
### ignore other than memory used
<Rule "mem_used_only">
<Match "regex">
Plugin "^memory$"
TypeInstance "^[f|s|c|b]"
</Match>
Target "stop"
</Rule>
# for the disk plugin, ignore other than disc_octets and disk_ops
<Rule "disk_o_only">
<Match "regex">
Plugin "^disk$"
Type "^(p|disk_[t|m|i])" #starts with p or disk_t|i|m
#Type "^(?!disk_o).+" # do not start with "disk_o" # does not work with collectd
</Match>
Target "stop"
</Rule>
# rename "disc_octets" to "bytes"
<Rule "rename_disk_octets">
<Match "regex">
Plugin "^disk$"
Type "^disk_octets$"
</Match>
<Target "set">
TypeInstance "bytes"
</Target>
Target "write"
Target "stop"
</Rule>
# no need to have an additional "disk" in the field name
<Rule "rename_disk_ops">
<Match "regex">
Plugin "^disk$"
Type "^disk_ops$"
</Match>
<Target "set">
TypeInstance "ops"
</Target>
Target "write"
Target "stop"
</Rule>
# rename CPU "active" to "used" and multiply each value by 0.01
<Rule "handle_cpu_active">
<Match "regex">
Plugin "^cpu$"
TypeInstance "^active$"
</Match>
<Target "scale">
Factor 0.01
</Target>
<Target "set">
TypeInstance "used"
</Target>
Target "write"
Target "stop"
</Rule>
</Chain>
......@@ -8,7 +8,10 @@ Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
URL: https://collectd.org/
Source: https://collectd.org/files/%{name}-%{version}.tar.bz2
Source1: collectd.conf
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::Embed)
BuildRequires: python3-devel
......@@ -620,7 +623,7 @@ make %{?_smp_mflags}
%install
make install DESTDIR="%{buildroot}"
install -Dp -m0644 src/collectd.conf %{buildroot}%{_sysconfdir}/collectd.conf
install -Dp -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/collectd.conf
install -Dp -m0644 contrib/systemd.collectd.service %{buildroot}%{_unitdir}/collectd.service
install -d %{buildroot}%{_sharedstatedir}/collectd/
install -d %{buildroot}%{_sysconfdir}/collectd.d/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment