initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
From 5e600ae2ad370ddbb759e84ce55a7dfaa9a0bdd7 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 6 Sep 2020 14:17:23 +0200
|
||||
Subject: [PATCH] src/netlink.c: remove REG_NOERROR
|
||||
|
||||
REG_NOERROR is used since version 5.12.0 and
|
||||
https://github.com/collectd/collectd/commit/f7fd32e5209e188db7985a42054252fc4cbfe7c1
|
||||
|
||||
However, REG_NOERROR is not defined by musl, even GNU regex do not
|
||||
mention REG_NOERROR, so just remove it to avoid the following build
|
||||
failure:
|
||||
|
||||
src/netlink.c: In function 'check_ignorelist':
|
||||
src/netlink.c:243:51: error: 'REG_NOERROR' undeclared (first use in this function); did you mean 'REG_NOTBOL'?
|
||||
if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
|
||||
^~~~~~~~~~~
|
||||
REG_NOTBOL
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/cd4d75888b5259b028132dd224be34f69bcbb702
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/collectd/collectd/pull/3569]
|
||||
---
|
||||
src/netlink.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/netlink.c b/src/netlink.c
|
||||
index 7a5da762..fac2fb1e 100644
|
||||
--- a/src/netlink.c
|
||||
+++ b/src/netlink.c
|
||||
@@ -240,7 +240,7 @@ static int check_ignorelist(const char *dev, const char *type,
|
||||
for (ir_ignorelist_t *i = ir_ignorelist_head; i != NULL; i = i->next) {
|
||||
#if HAVE_REGEX_H
|
||||
if (i->rdevice != NULL) {
|
||||
- if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
|
||||
+ if (regexec(i->rdevice, dev, 0, NULL, 0))
|
||||
continue;
|
||||
} else
|
||||
#endif
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -0,0 +1,761 @@
|
||||
menuconfig BR2_PACKAGE_COLLECTD
|
||||
bool "collectd"
|
||||
# Uses fork()
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
help
|
||||
collectd is a daemon which collects system performance
|
||||
statistics periodically and provides mechanisms to store
|
||||
the values in a variety of ways, for example in RRD files.
|
||||
|
||||
http://collectd.org/
|
||||
|
||||
if BR2_PACKAGE_COLLECTD
|
||||
|
||||
menu "match plugins"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_EMPTY_COUNTER
|
||||
bool "empty counter"
|
||||
help
|
||||
Match counter values which are currently zero.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_HASHED
|
||||
bool "hashed"
|
||||
help
|
||||
Match values using a hash function of the hostname.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_REGEX
|
||||
bool "regex"
|
||||
help
|
||||
Match values by their identifier based on regular expressions.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TIMEDIFF
|
||||
bool "timediff"
|
||||
help
|
||||
Match values with an invalid timestamp.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_VALUE
|
||||
bool "value"
|
||||
help
|
||||
Select values by their data sources' values.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "misc plugins"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_AGGREGATION
|
||||
bool "aggregation"
|
||||
help
|
||||
The Aggregate plugin allows to aggregate multiple values into
|
||||
a single value using one or several consolidation functions,
|
||||
e.g. summation and average.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOGFILE
|
||||
bool "logfile"
|
||||
default y
|
||||
help
|
||||
Writes log messages to a file or STDOUT/STDERR.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOGSTASH
|
||||
bool "logstash"
|
||||
select BR2_PACKAGE_YAJL
|
||||
help
|
||||
Writes log messages formatted as logstash JSON events.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LUA
|
||||
bool "lua"
|
||||
depends on BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
help
|
||||
Embeds a Lua interpreter into collectd and provides an
|
||||
interface to collectd's plugin system.
|
||||
|
||||
comment "lua support needs a Lua interpreter"
|
||||
depends on !BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL
|
||||
bool "notify_email"
|
||||
depends on !BR2_STATIC_LIBS # libesmtp
|
||||
select BR2_PACKAGE_LIBESMTP
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
Send an E-mail with the notification message to the
|
||||
configured recipients.
|
||||
|
||||
comment "notify_email needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NOTIFY_NAGIOS
|
||||
bool "notify_nagios"
|
||||
help
|
||||
Sends notifications to Nagios as a passive check result.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SYSLOG
|
||||
bool "syslog"
|
||||
default y
|
||||
help
|
||||
Logs to the standard UNIX logging mechanism.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_THRESHOLD
|
||||
bool "threshold"
|
||||
help
|
||||
Checks values against configured thresholds and creates
|
||||
notifications if values are out of bounds.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "read plugins"
|
||||
|
||||
comment "Select at least one for collectd to be useful"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_APACHE
|
||||
bool "apache"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Collects Apache's mod_status information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_APCUPS
|
||||
bool "apcups"
|
||||
help
|
||||
Collects UPS statistics from apcupsd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_BATTERY
|
||||
bool "battery"
|
||||
help
|
||||
Collects the battery's charge, the drawn current and voltage.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_BIND
|
||||
bool "bind"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
help
|
||||
Collects BIND DNS statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_BUDDYINFO
|
||||
bool "buddyinfo"
|
||||
help
|
||||
Statistics from buddyinfo file about memory fragmentation.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CAPABILITIES
|
||||
bool "capabilities"
|
||||
depends on BR2_aarch64 || BR2_i386 || BR2_x86_64 # dmidecode
|
||||
select BR2_PACKAGE_DMIDECODE # runtime
|
||||
select BR2_PACKAGE_JANSSON
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
help
|
||||
Collects selected static platform data using dmidecode and
|
||||
expose it through micro embedded webserver.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CEPH
|
||||
bool "ceph"
|
||||
select BR2_PACKAGE_YAJL
|
||||
help
|
||||
Statistics from the Ceph distributed storage system.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CHRONY
|
||||
bool "chrony"
|
||||
help
|
||||
Collects NTP data from the chrony NTP server.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CGROUPS
|
||||
bool "cgroups"
|
||||
help
|
||||
Collects CGroups CPU usage accounting.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CONNTRACK
|
||||
bool "conntrack"
|
||||
help
|
||||
Collects the number of entries in Linux's connection tracking
|
||||
table.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CONTEXTSWITCH
|
||||
bool "contextswitch"
|
||||
help
|
||||
Collects the number of context switches done by the operating
|
||||
system.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CPU
|
||||
bool "cpu"
|
||||
help
|
||||
Collects the amount of time spent by the CPU in various
|
||||
states.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CPUFREQ
|
||||
bool "cpufreq"
|
||||
help
|
||||
Collects the current CPU's frequency.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CPUSLEEP
|
||||
bool "cpusleep"
|
||||
help
|
||||
Measures time spent by CPU in deep sleep mode.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CURL
|
||||
bool "curl"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Uses libcurl to read files and then parses them according
|
||||
to the configuration.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CURL_JSON
|
||||
bool "curl-json"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_YAJL
|
||||
help
|
||||
Queries JSON data using the cURL library and parses it
|
||||
according to the user's configuration using YAJL.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CURL_XML
|
||||
bool "curl-xml"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
help
|
||||
Reads files using libcurl and parses it as XML.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DBI
|
||||
bool "dbi"
|
||||
select BR2_PACKAGE_LIBDBI
|
||||
help
|
||||
Executes SQL statements on various databases and
|
||||
interprets the returned data.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DF
|
||||
bool "df"
|
||||
help
|
||||
Collects file system usage information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DISK
|
||||
bool "disk"
|
||||
help
|
||||
Collects performance statistics of hard-disks and partitions.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DNS
|
||||
bool "dns"
|
||||
select BR2_PACKAGE_LIBPCAP
|
||||
help
|
||||
Collects statistics of DNS traffic using libpcap.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY
|
||||
bool "dpdk_telemetry"
|
||||
select BR2_PACKAGE_JANSSON
|
||||
help
|
||||
Collects DPDK ethernet device metrics via dpdk_telemetry
|
||||
library.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DRBD
|
||||
bool "drbd"
|
||||
help
|
||||
Collect individual drbd resource statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ENTROPY
|
||||
bool "entropy"
|
||||
help
|
||||
Collects the available entropy on a system.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ETHSTAT
|
||||
bool "ethstat"
|
||||
help
|
||||
Collects network interface card statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_EXEC
|
||||
bool "exec"
|
||||
help
|
||||
Executes scripts and reads values back that are printed
|
||||
to STDOUT by that program.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_FHCOUNT
|
||||
bool "fhcount"
|
||||
help
|
||||
File handles statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_FILECOUNT
|
||||
bool "filecount"
|
||||
help
|
||||
Counts the number of files in a directory and all its
|
||||
subdirectories.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_FSCACHE
|
||||
bool "fscache"
|
||||
help
|
||||
Collects information about the file-system based caching
|
||||
infrastructure for network file-systems and other slow media.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_GPS
|
||||
bool "gps"
|
||||
select BR2_PACKAGE_GPSD
|
||||
help
|
||||
Reports the number of sattelites seen by and precision
|
||||
of a GPS receiver.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_HUGEPAGES
|
||||
bool "hugepages"
|
||||
help
|
||||
Reports the number of used and free hugepages on Linux.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_INFINIBAND
|
||||
bool "infiniband"
|
||||
help
|
||||
Attributes and counters for each port on each IB device.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_INTERFACE
|
||||
bool "interface"
|
||||
help
|
||||
Collects information about the traffic of network interfaces.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IPC
|
||||
bool "ipc"
|
||||
help
|
||||
IPC counters: semaphores used, number of allocated segments
|
||||
in shared memory and more.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IPTABLES
|
||||
bool "iptables"
|
||||
select BR2_PACKAGE_IPTABLES
|
||||
help
|
||||
Gather statistics from iptables packet filter.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IPVS
|
||||
bool "ipvs"
|
||||
help
|
||||
Extracts statistics from IP Virtual Server (IPVS), the
|
||||
transport-layer load-balancer of the LVS project.
|
||||
It stores traffic and connections history for each of the
|
||||
Real Servers (RS) behind a local Virtual Server (VS).
|
||||
Collectd must be run on Directors (in LVS jargon).
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IRQ
|
||||
bool "irq"
|
||||
help
|
||||
Collects the number of interrupts.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOAD
|
||||
bool "load"
|
||||
help
|
||||
Collects the system load.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOGPARSER
|
||||
bool "logparser"
|
||||
help
|
||||
Plugin for filtering and parsing log messages.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MD
|
||||
bool "md"
|
||||
help
|
||||
Collects software-RAID device information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MDEVENTS
|
||||
bool "mdevents"
|
||||
help
|
||||
Events from md (Linux Software RAID) devices.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MEMCACHEC
|
||||
bool "memcachec"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
select BR2_PACKAGE_LIBMEMCACHED
|
||||
help
|
||||
Query and parse data from a memcache daemon.
|
||||
|
||||
comment "memcachec needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MEMCACHED
|
||||
bool "memcached"
|
||||
help
|
||||
Collects statistics from a memcached daemon.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MEMORY
|
||||
bool "memory"
|
||||
help
|
||||
Collects physical memory utilization.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MODBUS
|
||||
bool "modbus"
|
||||
select BR2_PACKAGE_LIBMODBUS
|
||||
help
|
||||
Reads register values from a modbus "slave" via Modbus/TCP.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MYSQL
|
||||
bool "mysql"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # mysql
|
||||
depends on BR2_USE_MMU # mysql
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # mysql
|
||||
select BR2_PACKAGE_MYSQL
|
||||
help
|
||||
Connects to a MySQL database and issues a "show status"
|
||||
command.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NETLINK
|
||||
bool "netlink"
|
||||
select BR2_PACKAGE_LIBMNL
|
||||
help
|
||||
Get statistics for interfaces, qdiscs, classes, and filters.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NFS
|
||||
bool "nfs"
|
||||
help
|
||||
Collects information about the usage of the Network File
|
||||
System.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NGINX
|
||||
bool "nginx"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Collects the number of requests handled by the nginx daemon
|
||||
since startup and the number of current connections by state.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NTPD
|
||||
bool "ntpd"
|
||||
help
|
||||
Queries an NTP server and extracts parameters.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NUT
|
||||
bool "nut"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
select BR2_PACKAGE_NUT
|
||||
help
|
||||
The NUT plugin collects uninterruptible power supply (UPS)
|
||||
statistics using the Network UPS Tools (NUT).
|
||||
|
||||
comment "nut needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OLSRD
|
||||
bool "olsrd"
|
||||
help
|
||||
Reads information about meshed networks from olsrd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ONEWIRE
|
||||
bool "onewire"
|
||||
select BR2_PACKAGE_OWFS
|
||||
help
|
||||
Collects temperature information from sensors connected over
|
||||
the OneWire bus.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OPENLDAP
|
||||
bool "openldap"
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_PACKAGE_OPENLDAP
|
||||
help
|
||||
Read monitoring information from OpenLDAP's cn=Monitor
|
||||
subtree.
|
||||
|
||||
comment "openldap support needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OPENVPN
|
||||
bool "openvpn"
|
||||
help
|
||||
Reads the status file of OpenVPN to collect statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_PING
|
||||
bool "ping"
|
||||
select BR2_PACKAGE_LIBOPING
|
||||
help
|
||||
Mesures network latency using ICMP "echo requests".
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_POSTGRESQL
|
||||
bool "postgresql"
|
||||
depends on BR2_USE_WCHAR # postgresql
|
||||
select BR2_PACKAGE_POSTGRESQL
|
||||
help
|
||||
Connects to and executes SQL statements on a PostgreSQL
|
||||
database. It then reads back the results and, depending on the
|
||||
configuration, the returned values are then converted into
|
||||
collectd 'value lists'.
|
||||
|
||||
comment "postgresql support needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_PROCESSES
|
||||
bool "processes"
|
||||
help
|
||||
Collects the number of processes gruped by state.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_PROTOCOLS
|
||||
bool "protocols"
|
||||
help
|
||||
Collects information about the network protocols.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_REDIS
|
||||
bool "redis"
|
||||
select BR2_PACKAGE_HIREDIS
|
||||
help
|
||||
Connects to one or more instances of Redis.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SENSORS
|
||||
bool "sensors"
|
||||
select BR2_PACKAGE_LM_SENSORS
|
||||
help
|
||||
Collects data from lm-sensors.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SERIAL
|
||||
bool "serial"
|
||||
help
|
||||
Collects the traffic on serial interfaces.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SMART
|
||||
bool "SMART"
|
||||
depends on BR2_PACKAGE_HAS_UDEV # libatasmart
|
||||
select BR2_PACKAGE_LIBATASMART
|
||||
help
|
||||
Collect SMART statistics, notably load cycle count,
|
||||
temperature and bad sectors.
|
||||
|
||||
comment "SMART requires udev to be enabled"
|
||||
depends on !BR2_PACKAGE_HAS_UDEV
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_STATSD
|
||||
bool "StatsD"
|
||||
help
|
||||
StatsD network protocol to allow clients to report "events".
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SNMP
|
||||
bool "snmp"
|
||||
select BR2_PACKAGE_NETSNMP
|
||||
help
|
||||
Reads values from SNMP devices.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SWAP
|
||||
bool "swap"
|
||||
help
|
||||
Collects the amount of memory currently written to disk.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SYNPROXY
|
||||
bool "synproxy"
|
||||
help
|
||||
Synproxy stats plugin.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TABLE
|
||||
bool "table"
|
||||
help
|
||||
Parses table-like structured plain-text files.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TAIL
|
||||
bool "tail"
|
||||
help
|
||||
Tails log files and each line is given to one or more matches
|
||||
which test if the line is relevant for any statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TAIL_CSV
|
||||
bool "tail csv"
|
||||
help
|
||||
Follows (tails) files in CSV format, parses each line and
|
||||
submits extracted values.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TCPCONNS
|
||||
bool "tcpconns"
|
||||
help
|
||||
Counts the number of TCP connections to/from a specified port.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_THERMAL
|
||||
bool "thermal"
|
||||
help
|
||||
Reads ACPI thermal zone information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_UBI
|
||||
bool "ubi"
|
||||
help
|
||||
UBI (Unsorted Block Images) is an erase block management layer
|
||||
for flash memory devices. UBI serves two purposes, tracking
|
||||
NAND flash bad blocks and providing wear leveling.
|
||||
This plugin collects some stats about UBI devices:
|
||||
* bad physical underlying blocks (bad_peb_count)
|
||||
* max erase counter value (max_ec)
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_UPTIME
|
||||
bool "uptime"
|
||||
help
|
||||
Keeps track of the system uptime.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_USERS
|
||||
bool "users"
|
||||
help
|
||||
Counts the number of users currently logged in.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_VMEM
|
||||
bool "vmem"
|
||||
help
|
||||
Collects information about the virtual memory subsystem.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WIRELESS
|
||||
bool "wireless"
|
||||
help
|
||||
Collects signal quality, power and noise ratio for WLAN cards.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ZOOKEEPER
|
||||
bool "zookeeper"
|
||||
help
|
||||
Read data from Zookeeper's MNTR command.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "target plugins"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NOTIFICATION
|
||||
bool "notification"
|
||||
help
|
||||
Create and dispatch a notification.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_REPLACE
|
||||
bool "replace"
|
||||
help
|
||||
Replace parts of an identifier using regular expressions.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SCALE
|
||||
bool "scale"
|
||||
help
|
||||
Scale (multiply) values by an arbitrary number.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SET
|
||||
bool "set"
|
||||
help
|
||||
Set (overwrite) entire parts of an identifier.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "write plugins"
|
||||
|
||||
comment "Select at least one for collectd to be useful"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_AMQP
|
||||
bool "amqp"
|
||||
select BR2_PACKAGE_OPENSSL # needs rabbitmq-c with ssl support
|
||||
select BR2_PACKAGE_RABBITMQ_C
|
||||
help
|
||||
Send/receive values via the Advanced Message Queuing Protocol
|
||||
(AMQP).
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CSV
|
||||
bool "csv"
|
||||
help
|
||||
Writes values to a plain-text file in Comma Separated Values
|
||||
format.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_GRAPHITE
|
||||
bool "graphite"
|
||||
help
|
||||
Writes data collected to Carbon (Graphite's) storage API.
|
||||
http://graphite.wikidot.com/start
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_GRPC
|
||||
bool "grpc"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
|
||||
depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf
|
||||
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # grpc -> libabseil-cpp
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_9 # grpc -> host-libabseil-cpp
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
|
||||
select BR2_PACKAGE_GRPC
|
||||
help
|
||||
Send/receive values using the gRPC protocol.
|
||||
|
||||
comment "grpc needs a toolchain w/ C++, gcc >= 4.9, host gcc >= 4.9"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
|
||||
|| !BR2_HOST_GCC_AT_LEAST_4_9
|
||||
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MQTT
|
||||
bool "mqtt"
|
||||
select BR2_PACKAGE_MOSQUITTO
|
||||
help
|
||||
Sends metrics to and/or receives metrics from an MQTT broker.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NETWORK
|
||||
bool "network"
|
||||
help
|
||||
Send/receive values from other instances of collectd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NETWORK_GCRYPT
|
||||
bool "crypto support"
|
||||
depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
|
||||
depends on BR2_PACKAGE_COLLECTD_NETWORK
|
||||
select BR2_PACKAGE_LIBGCRYPT
|
||||
help
|
||||
Enable crypto support
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_RRDTOOL
|
||||
bool "rrdtool"
|
||||
depends on BR2_USE_WCHAR # rrdtool
|
||||
select BR2_PACKAGE_RRDTOOL
|
||||
help
|
||||
Writes values to RRD-files.
|
||||
|
||||
comment "rrdtool support needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_RIEMANN
|
||||
bool "riemann"
|
||||
# riemann-c-client -> protobuf-c
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
select BR2_PACKAGE_RIEMANN_C_CLIENT
|
||||
select BR2_PACKAGE_LIBTOOL
|
||||
help
|
||||
Sends data to Riemann, a stream processing and monitoring
|
||||
system.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_UNIXSOCK
|
||||
bool "unixsock"
|
||||
help
|
||||
Opens a UNIX domain socket and accepts connections.
|
||||
One can send commands to the daemon and receive information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEHTTP
|
||||
bool "write_http"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Sends values collected to a web-server using HTTP POST and
|
||||
PUTVAL.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEINFLUXDBUDP
|
||||
bool "write_influxdb_udp"
|
||||
help
|
||||
Sends data to an instance of InfluxDB using the "Line
|
||||
Protocol".
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITELOG
|
||||
bool "write_log"
|
||||
help
|
||||
Writes data to the log.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
|
||||
bool "write_prometheus"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
select BR2_PACKAGE_PROTOBUF_C
|
||||
help
|
||||
Publishes values using an embedded HTTP server, in a format
|
||||
compatible with Prometheus' collectd_exporter.
|
||||
|
||||
comment "write_prometheus needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEREDIS
|
||||
bool "write_redis"
|
||||
select BR2_PACKAGE_HIREDIS
|
||||
help
|
||||
Sends data to Redis.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITESENSU
|
||||
bool "write_sensu"
|
||||
help
|
||||
Sends data to Sensu, a stream processing and monitoring
|
||||
system, via the Sensu client local TCP socket.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITETSDB
|
||||
bool "write_tsdb"
|
||||
help
|
||||
Sends data OpenTSDB, a scalable no master, no shared state
|
||||
time series database.
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
comment "collectd needs a toolchain w/ threads, dynamic library"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="collectd"
|
||||
EXEC="/usr/sbin/$DAEMON"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
COLLECTD_ARGS=""
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -S -q -p "$PIDFILE" -x "$EXEC" \
|
||||
-- $COLLECTD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally computed checksums
|
||||
sha512 7a15e4c0ae587db4987d673a790a4f3bea1cab29ce24a506fb21fa7bd2f60bfec70867eaa1c1395cb5b0e0ae81a024fb6109b064da0ef50e7c146d2198871c70 collectd-5.12.0.tar.bz2
|
||||
sha256 5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6 collectd-5.12.0.tar.bz2
|
||||
sha1 af36fe83e2995270b5632fc21e5a001e6702cdce collectd-5.12.0.tar.bz2
|
||||
sha256 ed0409b2b1c30566dab5fcdaf46ee70e140c99788e22f0267645a9357b476ae4 COPYING
|
||||
@@ -0,0 +1,256 @@
|
||||
################################################################################
|
||||
#
|
||||
# collectd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
COLLECTD_VERSION = 5.12.0
|
||||
COLLECTD_SITE = \
|
||||
https://github.com/collectd/collectd/releases/download/collectd-$(COLLECTD_VERSION)
|
||||
COLLECTD_SOURCE = collectd-$(COLLECTD_VERSION).tar.bz2
|
||||
COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes
|
||||
COLLECTD_INSTALL_STAGING = YES
|
||||
COLLECTD_LICENSE = MIT (daemon, plugins), GPL-2.0 (plugins), LGPL-2.1 (plugins)
|
||||
COLLECTD_LICENSE_FILES = COPYING
|
||||
COLLECTD_CPE_ID_VENDOR = collectd
|
||||
COLLECTD_SELINUX_MODULES = apache collectd
|
||||
|
||||
# These require unmet dependencies, are fringe, pointless or deprecated
|
||||
COLLECTD_PLUGINS_DISABLE = \
|
||||
apple_sensors aquaero ascent barometer dpdkstat email \
|
||||
gmond hddtemp intel_rdt ipmi java lpar \
|
||||
madwifi mbmon mic multimeter netapp notify_desktop numa \
|
||||
oracle perl pf pinba powerdns python routeros \
|
||||
rrdcached sigrok tape target_v5upgrade teamspeak2 ted \
|
||||
tokyotyrant turbostat uuid varnish virt vserver write_kafka \
|
||||
write_mongodb xencpu xmms zfs_arc zone
|
||||
|
||||
COLLECTD_CONF_ENV += LIBS="-lm"
|
||||
|
||||
#
|
||||
# NOTE: There's also a third availible setting "intswap", which might
|
||||
# be needed on some old ARM hardware (see [2]), but is not being
|
||||
# accounted for as per discussion [1]
|
||||
#
|
||||
# [1] http://lists.busybox.net/pipermail/buildroot/2017-November/206100.html
|
||||
# [2] http://lists.busybox.net/pipermail/buildroot/2017-November/206251.html
|
||||
#
|
||||
ifeq ($(BR2_ENDIAN),"BIG")
|
||||
COLLECTD_FP_LAYOUT=endianflip
|
||||
else
|
||||
COLLECTD_FP_LAYOUT=nothing
|
||||
endif
|
||||
|
||||
COLLECTD_CONF_OPTS += \
|
||||
--with-nan-emulation \
|
||||
--with-fp-layout=$(COLLECTD_FP_LAYOUT) \
|
||||
--with-perl-bindings=no \
|
||||
--disable-werror \
|
||||
$(foreach p, $(COLLECTD_PLUGINS_DISABLE), --disable-$(p)) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_AGGREGATION),--enable-aggregation,--disable-aggregation) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_AMQP),--enable-amqp,--disable-amqp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APACHE),--enable-apache,--disable-apache) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APCUPS),--enable-apcups,--disable-apcups) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BATTERY),--enable-battery,--disable-battery) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BIND),--enable-bind,--disable-bind) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BUDDYINFO),--enable-buddyinfo,--disable-buddyinfo) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CAPABILITIES),--enable-capabilities,--disable-capabilities) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CEPH),--enable-ceph,--disable-ceph) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CHRONY),--enable-chrony,--disable-chrony) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CGROUPS),--enable-cgroups,--disable-cgroups) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CONNTRACK),--enable-conntrack,--disable-conntrack) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CONTEXTSWITCH),--enable-contextswitch,--disable-contextswitch) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CPU),--enable-cpu,--disable-cpu) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CPUFREQ),--enable-cpufreq,--disable-cpufreq) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CPUSLEEP),--enable-cpusleep,--disable-cpusleep) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CSV),--enable-csv,--disable-csv) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL),--enable-curl,--disable-curl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),--enable-curl_json,--disable-curl_json) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),--enable-curl_xml,--disable-curl_xml) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DBI),--enable-dbi,--disable-dbi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DF),--enable-df,--disable-df) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DISK),--enable-disk,--disable-disk) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DNS),--enable-dns,--disable-dns) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY),--enable-dpdk_telemetry,--disable-dpdk_telemetry) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DRBD),--enable-drbd,--disable-drbd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_EMPTY_COUNTER),--enable-match_empty_counter,--disable-match_empty_counter) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ENTROPY),--enable-entropy,--disable-entropy) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ETHSTAT),--enable-ethstat,--disable-ethstat) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_EXEC),--enable-exec,--disable-exec) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_FHCOUNT),--enable-fhcount,--disable-fhcount) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_FILECOUNT),--enable-filecount,--disable-filecount) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GPS),--enable-gps,--disable-gps) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRPC),--enable-grpc,--disable-grpc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_HUGEPAGES),--enable-hugepages,--disable-hugepages) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_INFINIBAND),--enable-infiniband,--disable-infiniband) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPC),--enable-ipc,--disable-ipc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),--enable-iptables,--disable-iptables) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPVS),--enable-ipvs,--disable-ipvs) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IRQ),--enable-irq,--disable-irq) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOAD),--enable-load,--disable-load) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGFILE),--enable-logfile,--disable-logfile) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGPARSER),--enable-logparser,--disable-logparser) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),--enable-log_logstash,--disable-log_logstash) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LUA),--enable-lua,--disable-lua) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MD),--enable-md,--disable-md) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MDEVENTS),--enable-mdevents,--disable-mdevents) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),--enable-memcachec,--disable-memcachec) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHED),--enable-memcached,--disable-memcached) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMORY),--enable-memory,--disable-memory) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MODBUS),--enable-modbus,--disable-modbus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MQTT),--enable-mqtt,--disable-mqtt) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MYSQL),--enable-mysql,--disable-mysql) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NETLINK),--enable-netlink,--disable-netlink) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NETWORK),--enable-network,--disable-network) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NFS),--enable-nfs,--disable-nfs) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NGINX),--enable-nginx,--disable-nginx) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFICATION),--enable-target_notification,--disable-target_notification) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),--enable-notify_email,--disable-notify_email) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_NAGIOS),--enable-notify_nagios,--disable-notify_nagios) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NTPD),--enable-ntpd,--disable-ntpd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NUT),--enable-nut,--disable-nut) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OLSRD),--enable-olsrd,--disable-olsrd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),--enable-onewire,--disable-onewire) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),--enable-openldap,--disable-openldap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENVPN),--enable-openvpn,--disable-openvpn) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PING),--enable-ping,--disable-ping) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),--enable-postgresql,--disable-postgresql) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PROCESSES),--enable-processes,--disable-processes) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PROTOCOLS),--enable-protocols,--disable-protocols) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REDIS),--enable-redis,--disable-redis) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REGEX),--enable-match_regex,--disable-match-regex) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REPLACE),--enable-target_replace,--disable-target_replace) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RIEMANN),--enable-write_riemann,--disable-write_riemann) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),--enable-rrdtool,--disable-rrdtool) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SCALE),--enable-target_scale,--disable-target_scale) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SENSORS),--enable-sensors,--disable-sensors) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SERIAL),--enable-serial,--disable-serial) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_STATSD),--enable-statsd,--disable-statsd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SET),--enable-target_set,--disable-target_set) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SMART),--enable-smart,--disable-smart) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SNMP),--enable-snmp,--disable-snmp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SWAP),--enable-swap,--disable-swap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SYNPROXY),--enable-synproxy,--disable-synproxy) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SYSLOG),--enable-syslog,--disable-syslog) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TABLE),--enable-table,--disable-table) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TAIL),--enable-tail,--disable-tail) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TAIL_CSV),--enable-tail_csv,--disable-tail_csv) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TCPCONNS),--enable-tcpconns,--disable-tcpconns) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_THERMAL),--enable-thermal,--disable-thermal) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_THRESHOLD),--enable-threshold,--disable-threshold) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TIMEDIFF),--enable-match_timediff,--disable-match_timediff) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_UBI),--enable-ubi,--disable-ubi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_UNIXSOCK),--enable-unixsock,--disable-unixsock) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_UPTIME),--enable-uptime,--disable-uptime) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_USERS),--enable-users,--disable-users) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_VALUE),--enable-match_value,--disable-match_value) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_VMEM),--enable-vmem,--disable-vmem) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEINFLUXDBUDP),--enable-write_influxdb_udp,--disable-write_influxdb_udp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITELOG),--enable-write_log,--disable-write_log) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),--enable-write_prometheus,--disable-write_prometheus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),--enable-write_redis,--disable-write_redis) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITESENSU),--enable-write_sensu,--disable-write_sensu) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITETSDB),--enable-write_tsdb,--disable-write_tsdb) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ZOOKEEPER),--enable-zookeeper,--disable-zookeeper)
|
||||
|
||||
COLLECTD_DEPENDENCIES = \
|
||||
host-pkgconf \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_AMQP),rabbitmq-c) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APACHE),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BIND),libcurl libxml2) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CAPABILITIES),jansson libmicrohttpd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CEPH),yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),libcurl yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DBI),libdbi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY),jansson) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GPS),gpsd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LUA),luainterpreter) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MQTT),mosquitto) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MYSQL),mysql) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NETLINK),libmnl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NGINX),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),libesmtp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NUT),nut) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),owfs) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),openldap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PING),liboping) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),postgresql) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REDIS),hiredis) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RIEMANN),libtool riemann-c-client) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),rrdtool) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SENSORS),lm-sensors) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SMART),libatasmart) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SNMP),netsnmp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),libmicrohttpd protobuf-c) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),hiredis)
|
||||
|
||||
# include/library fixups
|
||||
ifeq ($(BR2_PACKAGE_JANSSON),y)
|
||||
COLLECTD_CONF_OPTS += --with-libjansson=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LUAJIT),y)
|
||||
COLLECTD_CONF_ENV += LIBLUA_PKG_CONFIG_NAME=luajit
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_MYSQL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
||||
COLLECTD_CONF_OPTS += --with-libnetsnmp=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config
|
||||
COLLECTD_CONF_ENV += LIBS="-lpthread -lm"
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_YAJL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libyajl=$(STAGING_DIR)/usr
|
||||
endif
|
||||
|
||||
# network can use libgcrypt
|
||||
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
||||
COLLECTD_DEPENDENCIES += libgcrypt
|
||||
COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr/bin/libgcrypt-config
|
||||
else
|
||||
COLLECTD_CONF_OPTS += --with-libgcrypt=no
|
||||
endif
|
||||
|
||||
define COLLECTD_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
|
||||
rm -f $(TARGET_DIR)/usr/bin/collectd-nagios
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_COLLECTD_POSTGRESQL),)
|
||||
define COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
|
||||
rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf
|
||||
endef
|
||||
COLLECTD_POST_INSTALL_TARGET_HOOKS += COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
|
||||
endif
|
||||
|
||||
define COLLECTD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/collectd/collectd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/collectd.service
|
||||
endef
|
||||
|
||||
define COLLECTD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/collectd/S90collectd \
|
||||
$(TARGET_DIR)/etc/init.d/S90collectd
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Statistics collection and monitoring daemon
|
||||
After=local-fs.target network.target
|
||||
Requires=local-fs.target network.target
|
||||
ConditionPathExists=/etc/collectd.conf
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
EnvironmentFile=-/etc/default/collectd
|
||||
ExecStartPre=/usr/sbin/collectd -t
|
||||
ExecStart=/usr/sbin/collectd
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user