├── src
├── liboconfig
│ ├── AUTHORS
│ ├── ChangeLog
│ ├── aux_types.h
│ └── oconfig.h
├── hddtemp.c
├── collectdctl.c
├── valgrind.FreeBSD.suppress
├── valgrind.suppress
├── libcollectdclient
│ ├── libcollectdclient.pc.in
│ └── collectd
│ │ ├── network_parse.h
│ │ ├── lcc_features.h.in
│ │ ├── network_buffer.h
│ │ └── network.h
├── pinba.proto
├── utils
│ ├── crc32
│ │ └── crc32.h
│ ├── cmds
│ │ ├── putnotif.h
│ │ ├── getthreshold.h
│ │ ├── parse_option.h
│ │ ├── listval.h
│ │ ├── flush.h
│ │ ├── getval.h
│ │ └── putval.h
│ ├── format_graphite
│ │ └── format_graphite.h
│ ├── taskstats
│ │ └── taskstats.h
│ ├── format_influxdb
│ │ └── format_influxdb.h
│ ├── rrdcreate
│ │ └── rrdcreate.h
│ ├── gce
│ │ └── gce.h
│ ├── format_json
│ │ └── format_json.h
│ ├── latency
│ │ ├── latency_config.h
│ │ └── latency.h
│ ├── ignorelist
│ │ └── ignorelist.h
│ ├── format_kairosdb
│ │ └── format_kairosdb.h
│ ├── curl_stats
│ │ └── curl_stats.h
│ ├── heap
│ │ └── heap_test.c
│ ├── oauth
│ │ └── oauth.h
│ └── format_stackdriver
│ │ └── format_stackdriver_test.c
├── daemon
│ ├── types_list.h
│ ├── cmd.h
│ ├── cmd_windows.c
│ ├── globals.h
│ ├── globals.c
│ ├── utils_random.h
│ ├── utils_llist.h
│ ├── utils_threshold.h
│ ├── utils_cache_mock.c
│ └── utils_random.c
├── write_riemann_threshold.h
├── collectd-tg.pod
├── collectdmon.pod
├── collectd-email.pod
├── utils_fbhash.h
├── utils_lua.h
├── xmms.c
├── nvme.h
├── virt_test.c
├── cpusleep.c
├── intel-nvme.h
├── network.h
├── msr-index.h
└── match_empty_counter.c
├── m4
└── .gitignore
├── contrib
├── collection3
│ ├── etc
│ │ └── .htaccess
│ ├── lib
│ │ ├── .htaccess
│ │ └── Collectd
│ │ │ └── Graph
│ │ │ └── Type
│ │ │ ├── Load.pm
│ │ │ ├── Df.pm
│ │ │ └── Wirkleistung.pm
│ ├── share
│ │ ├── .htaccess
│ │ ├── shortcut-icon.png
│ │ └── style.css
│ ├── bin
│ │ └── .htaccess
│ └── README
├── docker
│ ├── rootfs_prefix
│ │ ├── .gitignore
│ │ └── Makefile
│ ├── collectd.conf.d
│ │ └── sample.conf
│ ├── 50docker-apt-conf
│ ├── collectd.conf
│ └── Dockerfile
├── collectd2html.pl
├── collection.conf
├── exec-munin.conf
├── SpamAssassin
│ └── example.cf
├── redhat
│ ├── collection3.conf
│ ├── php-collection.conf
│ └── init.d-collectd
├── exec-nagios.conf
├── format.sh
├── 99-storage-collectd.rules
├── curl_json
│ └── php-fpm.conf
├── iptables
│ └── accounting.sh
├── solaris-smf
│ ├── collectd
│ └── collectd.xml
├── python
│ └── getsigchld.py
├── add_rra.sh
├── systemd.collectd.service
├── wiki2changelog.pl
├── sles10.1
│ └── init.d-collectd
├── oracle
│ └── db_systat.sql
├── network-proxy.py
├── aix
│ ├── init.d-collectd
│ └── collectd.spec
├── exec-smartctl
├── exec-ksm.sh
├── upstart.collectd.conf
└── php-collection
│ ├── config.php
│ └── definitions.local.php
├── .gitmodules
├── docs
├── review_comments_example.png
├── maintainer_guide.md
└── BUILD.java.md
├── .clang-format
├── bindings
├── perl
│ ├── t
│ │ ├── 00_load.t
│ │ └── 01_methods.t
│ ├── Makefile.PL
│ └── uninstall_mod.pl
└── java
│ └── org
│ └── collectd
│ └── api
│ ├── CollectdInitInterface.java
│ ├── CollectdWriteInterface.java
│ ├── CollectdLogInterface.java
│ ├── CollectdShutdownInterface.java
│ ├── CollectdFlushInterface.java
│ ├── CollectdConfigInterface.java
│ ├── CollectdNotificationInterface.java
│ ├── CollectdReadInterface.java
│ ├── CollectdMatchFactoryInterface.java
│ ├── CollectdMatchInterface.java
│ ├── CollectdTargetFactoryInterface.java
│ ├── CollectdTargetInterface.java
│ └── Notification.java
├── .mailmap
├── version-gen.sh
├── .github
├── issue_template.md
└── workflows
│ ├── distcheck.yml
│ └── release.yml
├── testwrapper.sh
├── CODEOWNERS
├── .gitignore
├── proto
├── prometheus.proto
├── types.proto
└── collectd.proto
└── clean.sh
/src/liboconfig/AUTHORS:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/m4/.gitignore:
--------------------------------------------------------------------------------
1 | !.gitignore
2 |
--------------------------------------------------------------------------------
/contrib/collection3/etc/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
2 |
--------------------------------------------------------------------------------
/contrib/collection3/lib/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
2 |
--------------------------------------------------------------------------------
/contrib/docker/rootfs_prefix/.gitignore:
--------------------------------------------------------------------------------
1 | rootprefix.so
2 |
--------------------------------------------------------------------------------
/contrib/collection3/share/.htaccess:
--------------------------------------------------------------------------------
1 | Options -ExecCGI
2 | SetHandler none
3 |
--------------------------------------------------------------------------------
/src/hddtemp.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/octo/collectd/HEAD/src/hddtemp.c
--------------------------------------------------------------------------------
/src/collectdctl.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/octo/collectd/HEAD/src/collectdctl.c
--------------------------------------------------------------------------------
/contrib/collection3/bin/.htaccess:
--------------------------------------------------------------------------------
1 | Options +ExecCGI
2 | AddHandler cgi-script .cgi
3 |
--------------------------------------------------------------------------------
/contrib/collectd2html.pl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/octo/collectd/HEAD/contrib/collectd2html.pl
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "gnulib"]
2 | path = gnulib
3 | url = git://git.savannah.gnu.org/gnulib.git
4 |
--------------------------------------------------------------------------------
/docs/review_comments_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/octo/collectd/HEAD/docs/review_comments_example.png
--------------------------------------------------------------------------------
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | BasedOnStyle: LLVM
3 | IncludeCategories:
4 | - Regex: '"collectd.h"'
5 | - Priority: -1
6 |
--------------------------------------------------------------------------------
/contrib/collection.conf:
--------------------------------------------------------------------------------
1 | datadir: "/opt/collectd/var/lib/collectd/rrd/"
2 | libdir: "/opt/collectd/lib/collectd/"
3 |
4 |
--------------------------------------------------------------------------------
/contrib/docker/collectd.conf.d/sample.conf:
--------------------------------------------------------------------------------
1 | LoadPlugin cpu
2 | LoadPlugin memory
3 | LoadPlugin disk
4 | LoadPlugin df
5 |
--------------------------------------------------------------------------------
/contrib/collection3/share/shortcut-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/octo/collectd/HEAD/contrib/collection3/share/shortcut-icon.png
--------------------------------------------------------------------------------
/bindings/perl/t/00_load.t:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 |
3 | use strict;
4 | use warnings;
5 | use Test::More tests => 1;
6 | use_ok 'Collectd::Unixsock';
7 |
--------------------------------------------------------------------------------
/contrib/exec-munin.conf:
--------------------------------------------------------------------------------
1 | AddType temperature temperature
2 |
3 | Interval 300
4 |
5 | Script /tmp/ipmisens2
6 | Script /tmp/munin-sensors.pl
7 |
--------------------------------------------------------------------------------
/contrib/SpamAssassin/example.cf:
--------------------------------------------------------------------------------
1 | collectd_buffersize 256
2 | collectd_socket /var/run/collectd-email
3 | collectd_timeout 2
4 | collectd_retries 3
5 |
6 |
--------------------------------------------------------------------------------
/contrib/docker/rootfs_prefix/Makefile:
--------------------------------------------------------------------------------
1 | rootfs_prefix.so: rootfs_prefix.c
2 | $(CC) -Wall -Werror -fPIC -shared -o rootfs_prefix.so rootfs_prefix.c -ldl
3 |
--------------------------------------------------------------------------------
/src/liboconfig/ChangeLog:
--------------------------------------------------------------------------------
1 | 2007-02-15, Version 0.1.1
2 | * src/parser.y: Fixes a memory leak.
3 |
4 | 2007-02-11, Version 0.1.0
5 | * Initial release.
6 |
--------------------------------------------------------------------------------
/contrib/docker/50docker-apt-conf:
--------------------------------------------------------------------------------
1 | APT::Install-Recommends "1";
2 | APT::Install-Suggests "1";
3 | APT::Get::Assume-Yes "1";
4 | APT::Get::AutomaticRemove "1";
5 |
--------------------------------------------------------------------------------
/src/valgrind.FreeBSD.suppress:
--------------------------------------------------------------------------------
1 | {
2 | strlen_bogus_invalid_read_after_strdup
3 | Memcheck:Addr4
4 | fun:parse_value
5 | ...
6 | fun:main
7 | }
8 |
--------------------------------------------------------------------------------
/contrib/redhat/collection3.conf:
--------------------------------------------------------------------------------
1 | Alias /collection3/ /var/www/collection3/
2 |
3 | Options +Indexes
4 | AllowOverride all
5 |
6 |
--------------------------------------------------------------------------------
/contrib/redhat/php-collection.conf:
--------------------------------------------------------------------------------
1 | Alias /php-collection/ /var/www/php-collection/
2 |
3 | DirectoryIndex index.php
4 | Options -Indexes
5 | AddType application/x-httpd-php .php
6 |
7 |
--------------------------------------------------------------------------------
/bindings/perl/Makefile.PL:
--------------------------------------------------------------------------------
1 | use ExtUtils::MakeMaker;
2 |
3 | WriteMakefile(
4 | NAME => 'Collectd',
5 | AUTHOR => 'Sebastian Harl ',
6 | TEST_REQUIRES => { 'YAML::Any' => 0 },
7 | );
8 |
9 | # vim: set sw=4 ts=4 tw=78 noexpandtab :
10 |
--------------------------------------------------------------------------------
/bindings/perl/uninstall_mod.pl:
--------------------------------------------------------------------------------
1 | #! /usr/bin/perl
2 |
3 | use strict;
4 | use ExtUtils::Installed;
5 |
6 | my $mod = $ARGV[0] || die "Usage : $0 Module\n";
7 | my $inst = ExtUtils::Installed->new();
8 | unlink $inst->files($mod), $inst->packlist($mod)->packlist_file();
9 |
--------------------------------------------------------------------------------
/.mailmap:
--------------------------------------------------------------------------------
1 | Anthony
2 | Florian Forster
3 | Florian Forster
4 | Luboš Staněk
5 | Luboš Staněk
6 | Niki W. Waibel
7 | Sebastian Harl
8 | Rodolphe Quiedeville
9 |
10 |
--------------------------------------------------------------------------------
/src/valgrind.suppress:
--------------------------------------------------------------------------------
1 | {
2 | libnl1_virt_initialization_unpreventable_leak
3 | Memcheck:Leak
4 | ...
5 | obj:*libnl.so.1.*
6 | ...
7 | }
8 |
9 | {
10 | libvirt memory allocated at init
11 | Memcheck:Leak
12 | fun:calloc
13 | fun:g_malloc0
14 | ...
15 | fun:virOnce
16 | }
17 |
--------------------------------------------------------------------------------
/version-gen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DEFAULT_VERSION="5.12.0.git"
4 |
5 | if [ -d .git ]; then
6 | VERSION="`git describe --tags --dirty=+ --abbrev=7 2> /dev/null | sed -e '/^collectd-/!d' -e 's///' -e 'y/-/./'`"
7 | fi
8 |
9 | if test -z "$VERSION"; then
10 | VERSION="$DEFAULT_VERSION"
11 | fi
12 |
13 | printf "%s" "$VERSION"
14 |
--------------------------------------------------------------------------------
/contrib/exec-nagios.conf:
--------------------------------------------------------------------------------
1 | # Run `perldoc exec-nagios.px' for details on this config file.
2 |
3 | NRPEConfig /etc/nrpe.cfg
4 |
5 | Interval 300
6 |
7 |
11 |
12 |
16 |
--------------------------------------------------------------------------------
/src/libcollectdclient/libcollectdclient.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | exec_prefix=@exec_prefix@
3 | libdir=@libdir@
4 | includedir=@includedir@
5 |
6 | Name: libcollectdclient
7 | Description: Client library for the unixsock plugin of collectd.
8 | Version: @LCC_VERSION_STRING@
9 | URL: http://collectd.org/
10 | Libs: -L${libdir} -lcollectdclient
11 | Cflags: -I${includedir}
12 |
--------------------------------------------------------------------------------
/contrib/docker/collectd.conf:
--------------------------------------------------------------------------------
1 | LoadPlugin logfile
2 |
3 | LogLevel "info"
4 | File STDOUT
5 | Timestamp true
6 | PrintSeverity true
7 |
8 |
9 | LoadPlugin unixsock
10 |
11 | SocketGroup "nogroup"
12 |
13 |
14 |
15 | Filter "*.conf"
16 |
17 |
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 | * Version of collectd:
2 | * Operating system / distribution:
3 | * Kernel version (if applicable):
4 |
5 | ## Expected behavior
6 |
7 | (Description of the behavior / output that you expected)
8 |
9 | ## Actual behavior
10 |
11 | (Description of the behavior / output that you observed)
12 |
13 | ## Steps to reproduce
14 |
15 | * step 1
16 | * step 2
17 | * step 3
18 |
--------------------------------------------------------------------------------
/src/liboconfig/aux_types.h:
--------------------------------------------------------------------------------
1 | #ifndef AUX_TYPES_H
2 | #define AUX_TYPES_H 1
3 |
4 | struct statement_list_s {
5 | oconfig_item_t *statement;
6 | int statement_num;
7 | };
8 | typedef struct statement_list_s statement_list_t;
9 |
10 | struct argument_list_s {
11 | oconfig_value_t *argument;
12 | int argument_num;
13 | };
14 | typedef struct argument_list_s argument_list_t;
15 |
16 | #endif /* AUX_TYPES_H */
17 |
--------------------------------------------------------------------------------
/contrib/format.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # This script sends files to a web service using POST requests and reads back
4 | # the correctly formatted source files. This allows to apply clang-format
5 | # without having to install the tool locally.
6 |
7 | if test $# -lt 1; then
8 | echo "Usage $0 [ ...]"
9 | exit 1
10 | fi
11 |
12 | for i in "$@"; do
13 | d="`dirname "${i}"`"
14 | o="`TMPDIR="${d}" mktemp format.XXXXXX`"
15 |
16 | curl --silent --data-binary "@-" https://format.collectd.org/ <"${i}" >"${o}"
17 | if test $? -eq 0; then
18 | cat "${o}" >"${i}"
19 | fi
20 | rm -f "${o}"
21 | done
22 |
--------------------------------------------------------------------------------
/contrib/99-storage-collectd.rules:
--------------------------------------------------------------------------------
1 | # Using ID_SERIAL attribute for naming disks in collectd results in
2 | # data about the whole disk and each partition being mixed together
3 | # incorrectly, see: https://github.com/collectd/collectd/issues/823
4 | #
5 | # The rules below provide a ID_COLLECTD attribute instead, which
6 | # differentiates between the whole disk and its particular partitions.
7 |
8 | ACTION=="remove", GOTO="collectd_end"
9 |
10 | SUBSYSTEM!="block", GOTO="collectd_end"
11 |
12 | ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", ENV{ID_COLLECTD}="$env{ID_SERIAL}-disk"
13 | ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", ENV{PARTN}=="?*", ENV{ID_COLLECTD}="$env{ID_SERIAL}-part$env{PARTN}"
14 |
15 | LABEL="collectd_end"
16 |
--------------------------------------------------------------------------------
/contrib/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:stable-slim
2 |
3 | ENV DEBIAN_FRONTEND noninteractive
4 | COPY 50docker-apt-conf /etc/apt/apt.conf.d/
5 |
6 | COPY rootfs_prefix/ /usr/src/rootfs_prefix/
7 |
8 | RUN apt-get update \
9 | && apt-get upgrade \
10 | && apt-get install \
11 | collectd-core \
12 | collectd-utils \
13 | build-essential \
14 | && make -C /usr/src/rootfs_prefix/ \
15 | && apt-get --purge remove build-essential \
16 | && apt-get clean \
17 | && rm -rf /var/lib/apt/lists/*
18 |
19 | COPY collectd.conf /etc/collectd/collectd.conf
20 | COPY collectd.conf.d /etc/collectd/collectd.conf.d
21 |
22 | ENV LD_PRELOAD /usr/src/rootfs_prefix/rootfs_prefix.so
23 |
24 | ENTRYPOINT ["/usr/sbin/collectd"]
25 | CMD ["-f"]
26 |
--------------------------------------------------------------------------------
/contrib/curl_json/php-fpm.conf:
--------------------------------------------------------------------------------
1 | # Example configuration for PHP-FPM
2 |
3 |
4 | Plugin "phpfpm"
5 | Instance "main"
6 |
7 | Type "total_requests"
8 | Instance "accepted"
9 |
10 |
11 | Type "total_requests"
12 | Instance "slow"
13 |
14 |
15 | Type "queue_length"
16 | Instance "listen"
17 |
18 |
19 | Type "vs_processes"
20 | Instance "active"
21 |
22 |
23 | Type "vs_processes"
24 | Instance "total"
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/pinba.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto2";
2 |
3 | package Pinba;
4 | option optimize_for = SPEED;
5 |
6 | message Request {
7 | required string hostname = 1;
8 | required string server_name = 2;
9 | required string script_name = 3;
10 | required uint32 request_count = 4;
11 | required uint32 document_size = 5;
12 | required uint32 memory_peak = 6;
13 | required float request_time = 7;
14 | required float ru_utime = 8;
15 | required float ru_stime = 9;
16 |
17 | repeated uint32 timer_hit_count = 10;
18 | repeated float timer_value = 11;
19 | repeated uint32 timer_tag_count = 12;
20 | repeated uint32 timer_tag_name = 13;
21 | repeated uint32 timer_tag_value = 14;
22 | repeated string dictionary = 15;
23 | optional uint32 status = 16;
24 | }
25 |
--------------------------------------------------------------------------------
/testwrapper.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # collectd -- testwrapper.sh
4 | #
5 | # A wrapper script for running tests. If valgrind is available, memory
6 | # checking will be enabled for all tests.
7 |
8 | set -e
9 |
10 | MEMCHECK=""
11 |
12 | if test -n "$VALGRIND"; then
13 | MEMCHECK="$VALGRIND --quiet --tool=memcheck --error-exitcode=1"
14 | MEMCHECK="$MEMCHECK --trace-children=yes"
15 | MEMCHECK="$MEMCHECK --leak-check=full"
16 | MEMCHECK="$MEMCHECK --gen-suppressions=all"
17 |
18 | for f in "valgrind.$( uname -s ).suppress" "valgrind.suppress"; do
19 | filename="$( dirname "$0" )/src/$f"
20 | if test -e "$filename"; then
21 | # Valgrind supports up to 100 suppression files.
22 | MEMCHECK="$MEMCHECK --suppressions=$filename"
23 | fi
24 | done
25 | fi
26 |
27 | exec $MEMCHECK "$@"
28 |
29 | # vim: set tw=78 sw=4 ts=4 noexpandtab :
30 |
31 |
--------------------------------------------------------------------------------
/.github/workflows/distcheck.yml:
--------------------------------------------------------------------------------
1 | name: Check the Distribution
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | permissions:
10 | contents: read
11 |
12 | defaults:
13 | run:
14 | shell: bash
15 |
16 | jobs:
17 | make_distcheck:
18 | runs-on: ubuntu-latest
19 | container: collectd/ci:debian12
20 | env:
21 | # this env var picked up by valgrind during make check phase
22 | VALGRIND_OPTS: "--errors-for-leak-kinds=definite"
23 | steps:
24 | - uses: actions/checkout@v4
25 | - name: Install bzip2
26 | run: apt install -y bzip2
27 | - name: Print available packages
28 | run: pkg-config --list-all | sort
29 | - name: Generate configure script
30 | run: ./build.sh
31 | - name: Run configure script
32 | run: ./configure
33 | - name: Run make distcheck
34 | run: make $MAKEFLAG distcheck
35 |
--------------------------------------------------------------------------------
/contrib/iptables/accounting.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #Simple script that sets up some chains in mangle table to do global logging of all
3 | #traffic going in and out of an interface
4 | #Could also use the regular input/output tree but this also catches the forwarded nat traffic
5 |
6 | IT="iptables -t mangle"
7 |
8 | #First clear the old stuff
9 | $IT -F incoming
10 | $IT -F outgoing
11 | $IT -N incoming
12 | $IT -N outgoing
13 |
14 | $IT -D PREROUTING -i eth0 -j incoming
15 | $IT -D POSTROUTING -o eth0 -j outgoing
16 |
17 | #should add some arg == stop exit here...
18 |
19 | $IT -A PREROUTING -i eth0 -j incoming
20 | $IT -A POSTROUTING -o eth0 -j outgoing
21 |
22 | $IT -A incoming -p tcp -m comment --comment "tcp"
23 | $IT -A incoming -p udp -m comment --comment "udp"
24 | $IT -A incoming -p icmp -m comment --comment "icmp"
25 |
26 | $IT -A outgoing -p tcp -m comment --comment "tcp"
27 | $IT -A outgoing -p udp -m comment --comment "udp"
28 | $IT -A outgoing -p icmp -m comment --comment "icmp"
29 |
30 |
--------------------------------------------------------------------------------
/contrib/solaris-smf/collectd:
--------------------------------------------------------------------------------
1 | #!/sbin/sh
2 |
3 | PIDFILE=/opt/collectd/var/run/collectd.pid
4 | DAEMON=/opt/collectd/sbin/collectd
5 |
6 | . /lib/svc/share/smf_include.sh
7 |
8 | case "$1" in
9 | start)
10 | if [ -f $PIDFILE ] ; then
11 | echo "Already running. Stale PID file?"
12 | PID=`cat $PIDFILE`
13 | echo "$PIDFILE contains $PID"
14 | ps -p $PID
15 | exit $SMF_EXIT_ERR_FATAL
16 | fi
17 | $DAEMON
18 | if [ $? -ne 0 ] ; then
19 | echo $DAEMON faild to start
20 | exit $SMF_EXIT_ERR_FATAL
21 | fi
22 | ;;
23 | stop)
24 | PID=`cat $PIDFILE 2>/dev/null`
25 | kill -15 $PID 2>/dev/null
26 | pwait $PID 1> /dev/null 2>/dev/null
27 | ;;
28 | restart)
29 | $0 stop
30 | $0 start
31 | ;;
32 | status)
33 | ps -ef | grep collectd | grep -v status | grep -v grep
34 | ;;
35 | *)
36 | echo "Usage: $0 [ start | stop | restart | status ]"
37 | exit 1
38 | ;;
39 | esac
40 |
41 |
42 | exit $SMF_EXIT_OK
43 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | release:
5 | types: [released, prereleased]
6 |
7 | permissions:
8 | contents: write
9 |
10 | defaults:
11 | run:
12 | shell: bash
13 |
14 | jobs:
15 | asset:
16 | runs-on: ubuntu-latest
17 | container: collectd/ci:debian12
18 | steps:
19 | - uses: actions/checkout@v4
20 | - run: |
21 | git config --global --add safe.directory "$(pwd)"
22 | git submodule init -- opentelemetry-proto
23 | git submodule update -- opentelemetry-proto
24 | - name: Generate configure script
25 | run: ./build.sh
26 | - name: Run configure script
27 | run: ./configure
28 | - name: Run make distcheck
29 | run: make -j $(nproc) distcheck
30 | - name: Upload distribution package
31 | run: |
32 | echo "GITHUB_REF_NAME=\"${GITHUB_REF_NAME}\""
33 | [[ -e "${GITHUB_REF_NAME:?}.tar.bz2" ]] && gh release upload "${GITHUB_REF_NAME:?}" "${GITHUB_REF_NAME:?}.tar.bz2"
34 | env:
35 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 |
--------------------------------------------------------------------------------
/contrib/python/getsigchld.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | ###############################################################################
4 | # WARNING! Importing this script will break the exec plugin! #
5 | ###############################################################################
6 | # Use this if you want to create new processes from your python scripts. #
7 | # Normally you will get a OSError exception when the new process terminates #
8 | # because collectd will ignore the SIGCHLD python is waiting for. #
9 | # This script will restore the default SIGCHLD behavior so python scripts can #
10 | # create new processes without errors. #
11 | ###############################################################################
12 | # WARNING! Importing this script will break the exec plugin! #
13 | ###############################################################################
14 |
15 | import signal
16 | import collectd
17 |
18 | def init():
19 | signal.signal(signal.SIGCHLD, signal.SIG_DFL)
20 |
21 | collectd.register_init(init)
22 |
--------------------------------------------------------------------------------
/docs/maintainer_guide.md:
--------------------------------------------------------------------------------
1 | ## Maintainer Guide
2 |
3 | This document documents best practises and guidelines for *collectd*
4 | maintainers.
5 |
6 | ### Ideology
7 |
8 | As maintainer of an open-source project, you are one of the most knowledgable
9 | people of the project's structure, best practices, goals, etc. You are most
10 | helping the project by *facilitating change*, in other words "help contributors
11 | make changes to the codebase."
12 |
13 | The most common form of helping users is doing *code reviews* and (eventually)
14 | using your commit rights to merge the pull request.
15 |
16 | ### Code reviews
17 |
18 | * Be friendly, especially with new contributors. Write "Hi" and thank them for their contribution before diving into review comments.
19 | * Criticize code, not people. Ideally, tell the contributor a better way to do what they need.
20 | * Clearly mark optional suggestions as such. Best practise, start your comment with *At your option: …*
21 | * Wait for a successful run of our [continuous integration system](https://ci.collectd.org/) before merging.
22 |
23 | ### Repository access
24 |
25 | You have write access to the *collectd/collectd* repository. Please use it
26 | responsibly.
27 |
--------------------------------------------------------------------------------
/contrib/add_rra.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | INPUT=$1
4 | OUTPUT=$2
5 |
6 | if [ -z "$INPUT" -o -z "$OUTPUT" ]
7 | then
8 | cat <