From b6aeb7e3d98268c16d923c08a06795390c75a191 Mon Sep 17 00:00:00 2001 From: Simon Nagl Date: Mon, 4 Feb 2019 15:33:07 +0100 Subject: CUPS plugin (#5188) * Implement a CUPS collector plugin * Compile cups.plugin only if enabled * Fix build with CFLAGS -O1 -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -DNETDATA_INTERNAL_CHECKS=1 -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1 * cups.plugin check for all used functions * Use cups-config to configure cups compiler flags * Do not quit if cups-config is not installed * Fix compiler warning collectors/cups.plugin/cups_plugin.c:359:27: warning: format '%d' expects argument of type 'int', but argument 6 has type 'unsigned int' [-Wformat=] * Add cups.plugin to toc and overview documentation * cups.plugin fix plugin doc layout * cups.plugin: Add prerequisites doc * cups.plugin: Fix error if cups is not installed --- Makefile.am | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index a487341ac5..50fd0a8aff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -105,6 +105,7 @@ AM_CFLAGS = \ $(OPTIONAL_UUID_CFLAGS) \ $(OPTIONAL_LIBCAP_LIBS) \ $(OPTIONAL_IPMIMONITORING_CFLAGS) \ + $(OPTIONAL_CUPS_CFLAGS) \ $(NULL) sbin_PROGRAMS = @@ -212,6 +213,11 @@ FREEIPMI_PLUGIN_FILES = \ $(LIBNETDATA_FILES) \ $(NULL) +CUPS_PLUGIN_FILES = \ + collectors/cups.plugin/cups_plugin.c \ + $(LIBNETDATA_FILES) \ + $(NULL) + NFACCT_PLUGIN_FILES = \ collectors/nfacct.plugin/plugin_nfacct.c \ collectors/nfacct.plugin/plugin_nfacct.h \ @@ -488,3 +494,12 @@ if ENABLE_PLUGIN_FREEIPMI $(OPTIONAL_IPMIMONITORING_LIBS) \ $(NULL) endif + +if ENABLE_PLUGIN_CUPS + plugins_PROGRAMS += cups.plugin + cups_plugin_SOURCES = $(CUPS_PLUGIN_FILES) + cups_plugin_LDADD = \ + $(NETDATA_COMMON_LIBS) \ + $(OPTIONAL_CUPS_LIBS) \ + $(NULL) +endif -- cgit v1.2.3