LIBS="$save_LIBS"
+# ------------------------------------------------------------------------------
+
+ENABLE_SOURCE([conntrack])
+ENABLE_SOURCE([contextswitches])
+ENABLE_SOURCE([cpufreq])
+ENABLE_SOURCE([df])
+ENABLE_SOURCE([disk])
+ENABLE_SOURCE([hostapd])
+ENABLE_SOURCE([interfaces], [$have_libnl3 $have_libnl3_route])
+ENABLE_SOURCE([ipfrag4])
+ENABLE_SOURCE([iptables], [$have_libiptc])
+ENABLE_SOURCE([legacy-gateway-latency4], [$have_libnl3 $have_libnl3_route])
+ENABLE_SOURCE([loadavg])
+ENABLE_SOURCE([memory])
+ENABLE_SOURCE([nftables], [$have_libmnl $have_libnftnl])
+ENABLE_SOURCE([pressure-cpu])
+ENABLE_SOURCE([pressure-io])
+ENABLE_SOURCE([pressure-memory])
+ENABLE_SOURCE([sensors], [$have_sensors])
+ENABLE_SOURCE([softirq])
+ENABLE_SOURCE([suricata])
+ENABLE_SOURCE([unbound])
+ENABLE_SOURCE([uptime])
+
# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
Generate man-pages: ${have_manpages}
- libatasmart: ${have_libatasmart}
- libiptc: ${have_libiptc}
- libmnl: ${have_libmnl}
- libnftnl: ${have_libnftnl}
- libnl-3: ${have_libnl3}
- libnl-3-route: ${have_libnl3_route}
- sensors: ${have_sensors}
+ Dependencies:
+ libatasmart: ${have_libatasmart}
+ libiptc: ${have_libiptc}
+ libmnl: ${have_libmnl}
+ libnftnl: ${have_libnftnl}
+ libnl-3: ${have_libnl3}
+ libnl-3-route: ${have_libnl3_route}
+ sensors: ${have_sensors}
+
+ Sources:
+ conntrack: ${build_source_interfaces}
+ contextswitches: ${build_source_contextswitches}
+ cpufreq: ${build_source_cpufreq}
+ df: ${build_source_df}
+ disk: ${build_source_disk}
+ hostapd: ${build_source_hostapd}
+ interfaces: ${build_source_interfaces}
+ ipfrag4: ${build_source_ipfrag4}
+ iptables: ${build_source_iptables}
+ legacy-gateway-latency4: ${build_source_legacy_gateway_latency4}
+ loadavg: ${build_source_loadavg}
+ memory: ${build_source_memory}
+ nftables: ${build_source_nftables}
+ pressure-cpu: ${build_source_pressure_cpu}
+ pressure-io: ${build_source_pressure_io}
+ pressure-memory: ${build_source_pressure_memory}
+ sensors: ${build_source_sensors}
+ softirq: ${build_source_softirq}
+ suricata: ${build_source_suricata}
+ unbound: ${build_source_unbound}
+ uptime: ${build_source_uptime}
])
--- /dev/null
+AC_DEFUN([ENABLE_SOURCE], [
+ # Replace hyphens with underscores
+ source=`echo "$1" | tr '-' '_'`
+
+ # Make the name uppercase for the macro
+ source_uppercase=`echo "$source" | tr 'a-z' 'A-Z'`
+
+ AC_ARG_ENABLE([$1],
+ AS_HELP_STRING([--enable-$1], [enable $1 source (auto/yes/no)]),
+ [eval enable_source_$source="$enableval"],
+ [eval enable_source_$source="auto"]
+ )
+
+ # Determine if all dependencies are present
+ all_deps=yes
+ for dep in $2; do
+ if test "x$dep" != "xyes"; then
+ all_deps=no
+ break
+ fi
+ done
+
+ eval "val=\$enable_source_$source"
+
+ case "$val" in
+ yes)
+ if test "x$all_deps" != "xyes"; then
+ AC_MSG_ERROR([source '$1' requested but one or more dependencies missing])
+ fi
+ eval build_source_$source=yes
+ ;;
+
+ no)
+ eval build_source_$source=no
+ ;;
+
+ auto)
+ if test "x$all_deps" = "xyes"; then
+ eval build_source_$source=yes
+ else
+ eval build_source_$source=no
+ fi
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value for --enable-$1=$val])
+ ;;
+ esac
+
+ eval "val=\$build_source_$source"
+
+ if test "x$val" = "xyes"; then
+ AC_DEFINE_UNQUOTED([BUILD_SOURCE_$source_uppercase], [1], [Build the $1 source])
+ else
+ AC_DEFINE_UNQUOTED([BUILD_SOURCE_$source_uppercase], [0], [Build the $1 source])
+ fi
+])
#include "sources/df.h"
#include "sources/disk.h"
#include "sources/hostapd.h"
+#include "sources/interfaces.h"
#include "sources/ipfrag4.h"
+#include "sources/iptables.h"
+#include "sources/legacy-gateway-latency4.h"
#include "sources/loadavg.h"
#include "sources/memory.h"
+#include "sources/nftables.h"
#include "sources/pressure-cpu.h"
#include "sources/pressure-io.h"
#include "sources/pressure-memory.h"
#include "sources/processor.h"
+#include "sources/sensors.h"
#include "sources/softirq.h"
#include "sources/suricata.h"
#include "sources/unbound.h"
#include "sources/uptime.h"
-// legacy gateway latency4
-#ifdef HAVE_LIBNL3
-# ifdef HAVE_LIBNL3_ROUTE
-# include "sources/interfaces.h"
-# endif /* HAVE_LIBNL3_ROUTE */
-#endif /* HAVE_LIBNL3 */
-
-// iptables
-#ifdef HAVE_LIBIPTC
-# include "sources/iptables.h"
-#endif /* HAVE_LIBIPTC */
-
-// legacy gateway latency4
-#ifdef HAVE_LIBNL3
-# ifdef HAVE_LIBNL3_ROUTE
-# include "sources/legacy-gateway-latency4.h"
-# endif /* HAVE_LIBNL3_ROUTE */
-#endif /* HAVE_LIBNL3 */
-
-// nftables
-#ifdef HAVE_LIBMNL
-# ifdef HAVE_LIBNFTNL
-# include "sources/nftables.h"
-# endif /* HAVE_LIBNFTNL */
-#endif /* HAVE_LIBMNL */
-
-// sensors
-#ifdef HAVE_SENSORS
-# include "sources/sensors.h"
-#endif /* HAVE_SENSORS */
-
// Load test sources
#if ENABLE_TESTS
# include "sources/test-error.h"
// Register all sources
static const td_source_impl* source_impls[] = {
+#ifdef BUILD_SOURCE_CONNTRACK
&conntrack_source,
+#endif /* BUILD_SOURCE_CONNTRACK */
+
+#ifdef BUILD_SOURCE_CONNTEXTSWITCHES
&contextswitches_source,
+#endif /* BUILD_SOURCE_CONNTEXTSWITCHES */
+
+#ifdef BUILD_SOURCE_CPUFREQ
&cpufreq_source,
+#endif /* BUILD_SOURCE_CPUFREQ */
+
+#ifdef BUILD_SOURCE_DF
&df_source,
+#endif /* BUILD_SOURCE_DF */
+
+#ifdef BUILD_SOURCE_DISK
&disk_source,
+#endif /* BUILD_SOURCE_DISK */
+
+#ifdef BUILD_SOURCE_HOSTAPD
&hostapd_source,
- &ipfrag4_source,
- &loadavg_source,
- &memory_source,
- &pressure_cpu_source,
- &pressure_io_source,
- &pressure_memory_source,
- &processor_source,
- &softirq_source,
- &suricata_source,
- &unbound_source,
- &uptime_source,
+#endif /* BUILD_SOURCE_HOSTAPD */
- // Interfaces
-#ifdef HAVE_LIBNL3
-# ifdef HAVE_LIBNL3_ROUTE
+#ifdef BUILD_SOURCE_INTERFACES
&interfaces_source,
-# endif /* HAVE_LIBNL3_ROUTE */
-#endif /* HAVE_LIBNL3 */
+#endif /* BUILD_SOURCE_INTERFACES */
- // iptables
-#ifdef HAVE_LIBIPTC
+#ifdef BUILD_SOURCE_IPFRAG4
+ &ipfrag4_source,
+#endif /* BUILD_SOURCE_IPFRAG4 */
+
+#ifdef BUILD_SOURCE_IPTABLES
&iptables_source,
-#endif /* HAVE_LIBIPTC */
+#endif /* BUILD_SOURCE_IPTABLES */
- // legacy gateway latency4
-#ifdef HAVE_LIBNL3
-# ifdef HAVE_LIBNL3_ROUTE
+#ifdef BUILD_SOURCE_LEGACY_GATEWAY_LATENCY4
&legacy_gateway_latency4_source,
-# endif /* HAVE_LIBNL3_ROUTE */
-#endif /* HAVE_LIBNL3 */
+#endif /* BUILD_SOURCE_LEGACY_GATEWAY_LATENCY4 */
- // nftables
-#ifdef HAVE_LIBMNL
-# ifdef HAVE_LIBNFTNL
+#ifdef BUILD_SOURCE_LOADAVG
+ &loadavg_source,
+#endif /* BUILD_SOURCE_LOADAVG */
+
+#ifdef BUILD_SOURCE_MEMORY
+ &memory_source,
+#endif /* BUILD_SOURCE_MEMORY */
+
+#ifdef BUILD_SOURCE_NFTABLES
&nftables_source,
-# endif /* HAVE_LIBNFTNL */
-#endif /* HAVE_LIBMNL */
+#endif /* BUILD_SOURCE_NFTABLES */
+
+#ifdef BUILD_SOURCE_PRESSURE_CPU
+ &pressure_cpu_source,
+#endif /* BUILD_SOURCE_PRESSURE_CPU */
- // sensors
-#ifdef HAVE_SENSORS
+#ifdef BUILD_SOURCE_PRESSURE_IO
+ &pressure_io_source,
+#endif /* BUILD_SOURCE_PRESSURE_IO */
+
+#ifdef BUILD_SOURCE_PRESSURE_MEMORY
+ &pressure_memory_source,
+#endif /* BUILD_SOURCE_PRESSURE_MEMORY */
+
+#ifdef BUILD_SOURCE_PROCESSOR
+ &processor_source,
+#endif /* BUILD_SOURCE_PROCESSOR */
+
+#ifdef BUILD_SOURCE_SENSORS
&sensors_input_source,
&sensors_fan_source,
&sensors_temp_source,
&sensors_power_source,
&sensors_energy_source,
&sensors_current_source,
-#endif /* HAVE_SENSORS */
+#endif /* BUILD_SOURCE_SENSORS */
+
+#ifdef BUILD_SOURCE_SOFTIRQ
+ &softirq_source,
+#endif /* BUILD_SOURCE_SOFTIRQ */
+
+#ifdef BUILD_SOURCE_SURICATA
+ &suricata_source,
+#endif /* BUILD_SOURCE_SURICATA */
+
+#ifdef BUILD_SOURCE_UNBOUND
+ &unbound_source,
+#endif /* BUILD_SOURCE_UNBOUND */
+
+#ifdef BUILD_SOURCE_UPTIME
+ &uptime_source,
+#endif /* BUILD_SOURCE_UPTIME */
#if ENABLE_TESTS
// Tests
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_CONNTRACK
+
#include <string.h>
#include "../ctx.h"
// Methods
.heartbeat = conntrack_heartbeat,
};
+
+#endif /* BUILD_SOURCE_CONNTRACK */
#ifndef TELEMETRY_SOURCE_CONNTRACK_H
#define TELEMETRY_SOURCE_CONNTRACK_H
+#ifdef BUILD_SOURCE_CONNTRACK
#include "../source.h"
extern const td_source_impl conntrack_source;
+#endif /* BUILD_SOURCE_CONNTRACK */
#endif /* TELEMETRY_SOURCE_CONNTRACK_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_CONTEXTSWITCHES
+
#include <errno.h>
#include <linux/perf_event.h>
#include <stdlib.h>
.free = contextswitches_free,
.heartbeat = contextswitches_heartbeat,
};
+
+#endif /* BUILD_SOURCE_CONTEXTSWITCHES */
#ifndef TELEMETRY_SOURCE_CONTEXTSWITCHES_H
#define TELEMETRY_SOURCE_CONTEXTSWITCHES_H
+#ifdef BUILD_SOURCE_CONTEXTSWITCHES
#include "../source.h"
extern const td_source_impl contextswitches_source;
+#endif /* BUILD_SOURCE_CONTEXTSWITCHES */
#endif /* TELEMETRY_SOURCE_CONTEXTSWITCHES_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_CPUFREQ
+
#include <errno.h>
#include <limits.h>
#include <unistd.h>
// Methods
.heartbeat = cpufreq_heartbeat,
};
+
+#endif /* BUILD_SOURCE_CPUFREQ */
#ifndef TELEMETRY_SOURCE_CPUFREQ_H
#define TELEMETRY_SOURCE_CPUFREQ_H
+#ifdef BUILD_SOURCE_CPUFREQ
#include "../source.h"
extern const td_source_impl cpufreq_source;
+#endif /* BUILD_SOURCE_CPUFREQ */
#endif /* TELEMETRY_SOURCE_CPUFREQ_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_DF
+
#include <errno.h>
#include <mntent.h>
#include <sys/statvfs.h>
// Methods
.heartbeat = df_heartbeat,
};
+
+#endif /* BUILD_SOURCE_DF */
#ifndef TELEMETRY_SOURCE_DF_H
#define TELEMETRY_SOURCE_DF_H
+#ifdef BUILD_SOURCE_DF
#include "../source.h"
extern const td_source_impl df_source;
+#endif /* BUILD_SOURCE_DF */
#endif /* TELEMETRY_SOURCE_DF_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_DISK
+
#include <errno.h>
#include <limits.h>
// Methods
.heartbeat = disk_heartbeat,
};
+
+#endif /* BUILD_SOURCE_DISK */
#ifndef TELEMETRY_SOURCE_DISK_H
#define TELEMETRY_SOURCE_DISK_H
+#ifdef BUILD_SOURCE_DISK
#include "../source.h"
extern const td_source_impl disk_source;
+#endif /* BUILD_SOURCE_DISK */
#endif /* TELEMETRY_SOURCE_DISK_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_HOSTAPD
+
#include <errno.h>
#include <net/ethernet.h>
#include <netinet/ether.h>
// Methods
.heartbeat = hostapd_heartbeat,
};
+
+#endif /* BUILD_SOURCE_HOSTAPD */
#ifndef TELEMETRY_SOURCE_HOSTAPD_H
#define TELEMETRY_SOURCE_HOSTAPD_H
+#ifdef BUILD_SOURCE_HOSTAPD
#include "../source.h"
extern const td_source_impl hostapd_source;
+#endif /* BUILD_SOURCE_HOSTAPD */
#endif /* TELEMETRY_SOURCE_HOSTAPD_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_INTERFACES
+
#include <errno.h>
#include <limits.h>
// Methods
.heartbeat = interfaces_heartbeat,
};
+
+#endif /* BUILD_SOURCE_INTERFACES */
#ifndef TELEMETRY_SOURCE_INTERFACES_H
#define TELEMETRY_SOURCE_INTERFACES_H
+#ifdef BUILD_SOURCE_INTERFACES
#include "../source.h"
extern const td_source_impl interfaces_source;
+#endif /* BUILD_SOURCE_INTERFACES */
#endif /* TELEMETRY_SOURCE_INTERFACES_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_IPFRAG4
+
#include "../ctx.h"
#include "../proto.h"
#include "../source.h"
// Methods
.heartbeat = ipfrag4_heartbeat,
};
+
+#endif /* BUILD_SOURCE_IPFRAG4 */
#ifndef TELEMETRY_SOURCE_IPFRAG4_H
#define TELEMETRY_SOURCE_IPFRAG4_H
+#ifdef BUILD_SOURCE_IPFRAG4
#include "../source.h"
extern const td_source_impl ipfrag4_source;
+#endif /* BUILD_SOURCE_IPFRAG4 */
#endif /* TELEMETRY_SOURCE_IPFRAG4_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_IPTABLES
+
#include <libiptc/libiptc.h>
#include <linux/netfilter/x_tables.h>
// Methods
.heartbeat = iptables_heartbeat,
};
+
+#endif /* BUILD_SOURCE_IPTABLES */
#ifndef TELEMETRY_SOURCE_IPTABLES_H
#define TELEMETRY_SOURCE_IPTABLES_H
+#ifdef BUILD_SOURCE_IPTABLES
#include "../source.h"
extern const td_source_impl iptables_source;
+#endif /* BUILD_SOURCE_IPTABLES */
#endif /* TELEMETRY_SOURCE_IPTABLES_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_LEGACY_GATEWAY_LATENCY4
+
#include <errno.h>
#include <limits.h>
#include <linux/if_arp.h>
// Methods
.heartbeat = legacy_gateway_latency4_heartbeat,
};
+
+#endif /* BUILD_SOURCE_LEGACY_GATEWAY_LATENCY4 */
#ifndef TELEMETRY_SOURCE_LEGACY_GATEWAY_LATENCY4_H
#define TELEMETRY_SOURCE_LEGACY_GATEWAY_LATENCY4_H
+#ifdef BUILD_SOURCE_LEGACY_GATEWAY_LATENCY4
#include "../source.h"
extern const td_source_impl legacy_gateway_latency4_source;
+#endif /* BUILD_SOURCE_LEGACY_GATEWAY_LATENCY4 */
#endif /* TELEMETRY_SOURCE_LEGACY_GATEWAY_LATENCY4_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_LOADAVG
+
#include <stdlib.h>
#include "../ctx.h"
// Methods
.heartbeat = loadavg_heartbeat,
};
+
+#endif /* BUILD_SOURCE_LOADAVG */
#ifndef TELEMETRY_SOURCE_LOADAVG_H
#define TELEMETRY_SOURCE_LOADAVG_H
+#ifdef BUILD_SOURCE_LOADAVG
#include "../source.h"
extern const td_source_impl loadavg_source;
+#endif /* BUILD_SOURCE_LOADAVG */
#endif /* TELEMETRY_SOURCE_LOADAVG_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_MEMORY
+
#include "../ctx.h"
#include "../proc.h"
#include "../source.h"
// Methods
.heartbeat = memory_heartbeat,
};
+
+#endif /* BUILD_SOURCE_MEMORY */
#ifndef TELEMETRY_SOURCE_MEMORY_H
#define TELEMETRY_SOURCE_MEMORY_H
+#ifdef BUILD_SOURCE_MEMORY
#include "../source.h"
extern const td_source_impl memory_source;
+#endif /* BUILD_SOURCE_MEMORY */
#endif /* TELEMETRY_SOURCE_MEMORY_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_NFTABLES
+
#include <linux/netfilter/nf_tables.h>
#include <libmnl/libmnl.h>
.free = nftables_free,
.heartbeat = nftables_heartbeat,
};
+
+#endif /* BUILD_SOURCE_NFTABLES */
#ifndef TELEMETRY_SOURCE_NFTABLES_H
#define TELEMETRY_SOURCE_NFTABLES_H
+#ifdef BUILD_SOURCE_NFTABLES
#include "../source.h"
extern const td_source_impl nftables_source;
+#endif /* BUILD_SOURCE_NFTABLES */
#endif /* TELEMETRY_SOURCE_NFTABLES_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_PRESSURE_CPU
+
#include "../ctx.h"
#include "../proc.h"
#include "../source.h"
// Methods
.heartbeat = pressure_cpu_heartbeat,
};
+
+#endif /* BUILD_SOURCE_PRESSURE_CPU */
#ifndef TELEMETRY_SOURCE_PRESSURE_CPU_H
#define TELEMETRY_SOURCE_PRESSURE_CPU_H
+#ifdef BUILD_SOURCE_PRESSURE_CPU
#include "../source.h"
extern const td_source_impl pressure_cpu_source;
+#endif /* BUILD_SOURCE_PRESSURE_CPU */
#endif /* TELEMETRY_SOURCE_PRESSURE_CPU_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_PRESSURE_IO
+
#include "../ctx.h"
#include "../proc.h"
#include "../source.h"
// Methods
.heartbeat = pressure_io_heartbeat,
};
+
+#endif /* BUILD_SOURCE_PRESSURE_IO */
#ifndef TELEMETRY_SOURCE_PRESSURE_IO_H
#define TELEMETRY_SOURCE_PRESSURE_IO_H
+#ifdef BUILD_SOURCE_PRESSURE_IO
#include "../source.h"
extern const td_source_impl pressure_io_source;
+#endif /* BUILD_SOURCE_PRESSURE_IO */
#endif /* TELEMETRY_SOURCE_PRESSURE_IO_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_PRESSURE_MEMORY
+
#include "../ctx.h"
#include "../proc.h"
#include "../source.h"
// Methods
.heartbeat = pressure_memory_heartbeat,
};
+
+#endif /* BUILD_SOURCE_PRESSURE_MEMORY */
#ifndef TELEMETRY_SOURCE_PRESSURE_MEMORY_H
#define TELEMETRY_SOURCE_PRESSURE_MEMORY_H
+#ifdef BUILD_SOURCE_PRESSURE_MEMORY
#include "../source.h"
extern const td_source_impl pressure_memory_source;
+#endif /* BUILD_SOURCE_PRESSURE_MEMORY */
#endif /* TELEMETRY_SOURCE_PRESSURE_MEMORY_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_PROCESSOR
+
#include "../ctx.h"
#include "../proc.h"
#include "../source.h"
// Methods
.heartbeat = processor_heartbeat,
};
+
+#endif /* BUILD_SOURCE_PROCESSOR */
#ifndef TELEMETRY_SOURCE_PROCESSOR_H
#define TELEMETRY_SOURCE_PROCESSOR_H
+#ifdef BUILD_SOURCE_PROCESSOR
#include "../source.h"
extern const td_source_impl processor_source;
+#endif /* BUILD_SOURCE_PROCESSOR */
#endif /* TELEMETRY_SOURCE_PROCESSOR_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_SENSORS
+
#include <ctype.h>
#include <errno.h>
// Methods
.heartbeat = sensors_current_heartbeat,
};
+
+#endif /* BUILD_SOURCE_SENSORS */
#ifndef TELEMETRY_SOURCE_SENSORS_H
#define TELEMETRY_SOURCE_SENSORS_H
+#ifdef BUILD_SOURCE_SENSORS
#include "../source.h"
extern const td_source_impl sensors_energy_source;
extern const td_source_impl sensors_current_source;
+#endif /* BUILD_SOURCE_SENSORS */
#endif /* TELEMETRY_SOURCE_SENSORS_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_SOFTIRQ
+
#include "../ctx.h"
#include "../proc.h"
#include "../source.h"
// Methods
.heartbeat = softirq_heartbeat,
};
+
+#endif /* BUILD_SOURCE_SOFTIRQ */
#ifndef TELEMETRY_SOURCE_SOFTIRQS_H
#define TELEMETRY_SOURCE_SOFTIRQS_H
+#ifdef BUILD_SOURCE_SOFTIRQ
#include "../source.h"
extern const td_source_impl softirq_source;
+#endif /* BUILD_SOURCE_SOFTIRQ */
#endif /* TELEMETRY_SOURCE_SOFTIRQS_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_SURICATA
+
#include <errno.h>
#include <systemd/sd-json.h>
// Methods
.heartbeat = suricata_heartbeat,
};
+
+#endif /* BUILD_SOURCE_SURICATA */
#ifndef TELEMETRY_SOURCE_SURICATA_H
#define TELEMETRY_SOURCE_SURICATA_H
+#ifdef BUILD_SOURCE_SURICATA
#include "../source.h"
extern const td_source_impl suricata_source;
+#endif /* BUILD_SOURCE_SURICATA */
#endif /* TELEMETRY_SOURCE_SURICATA_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_UNBOUND
+
#include <errno.h>
#include "../command.h"
// Methods
.heartbeat = unbound_heartbeat,
};
+
+#endif /* BUILD_SOURCE_UNBOUND */
#ifndef TELEMETRY_SOURCE_UNBOUND_H
#define TELEMETRY_SOURCE_UNBOUND_H
+#ifdef BUILD_SOURCE_UNBOUND
#include "../source.h"
extern const td_source_impl unbound_source;
+#endif /* BUILD_SOURCE_UNBOUND */
#endif /* TELEMETRY_SOURCE_UNBOUND_H */
# #
#############################################################################*/
+#ifdef BUILD_SOURCE_UPTIME
+
#include <errno.h>
#include <sys/sysinfo.h>
// Methods
.heartbeat = uptime_heartbeat,
};
+
+#endif /* BUILD_SOURCE_UPTIME */
#ifndef TELEMETRY_SOURCE_UPTIME_H
#define TELEMETRY_SOURCE_UPTIME_H
+#ifdef BUILD_SOURCE_UPTIME
#include "../source.h"
extern const td_source_impl uptime_source;
+#endif /* BUILD_SOURCE_UPTIME */
#endif /* TELEMETRY_SOURCE_UPTIME_H */