summaryrefslogtreecommitdiffstats
path: root/collectors/cups.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
commita836a244a3d2bdd4da1ee2641e3e957850668cea (patch)
treecb87c75b3677fab7144f868435243f864048a1e6 /collectors/cups.plugin
parentAdding upstream version 1.38.1. (diff)
downloadnetdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.tar.xz
netdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.zip
Adding upstream version 1.39.0.upstream/1.39.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/cups.plugin')
-rw-r--r--collectors/cups.plugin/README.md4
-rw-r--r--collectors/cups.plugin/cups_plugin.c8
-rw-r--r--collectors/cups.plugin/metrics.csv7
3 files changed, 13 insertions, 6 deletions
diff --git a/collectors/cups.plugin/README.md b/collectors/cups.plugin/README.md
index 0658cc8b..8652ec57 100644
--- a/collectors/cups.plugin/README.md
+++ b/collectors/cups.plugin/README.md
@@ -4,10 +4,10 @@ custom_edit_url: "https://github.com/netdata/netdata/edit/master/collectors/cups
sidebar_label: "cups.plugin"
learn_status: "Published"
learn_topic_type: "References"
-learn_rel_path: "References/Collectors references/Remotes/Devices"
+learn_rel_path: "Integrations/Monitor/Remotes/Devices"
-->
-# cups.plugin
+# Printers (cups.plugin)
`cups.plugin` collects Common Unix Printing System (CUPS) metrics.
diff --git a/collectors/cups.plugin/cups_plugin.c b/collectors/cups.plugin/cups_plugin.c
index b9d91c85..ecadc4ec 100644
--- a/collectors/cups.plugin/cups_plugin.c
+++ b/collectors/cups.plugin/cups_plugin.c
@@ -159,12 +159,12 @@ struct job_metrics *get_job_metrics(char *dest) {
reset_job_metrics(NULL, &new_job_metrics, NULL);
jm = dictionary_set(dict_dest_job_metrics, dest, &new_job_metrics, sizeof(struct job_metrics));
- printf("CHART cups.job_num_%s '' 'Active jobs of %s' jobs '%s' cups.job_num stacked %i %i\n", dest, dest, dest, netdata_priority++, netdata_update_every);
+ printf("CHART cups.job_num_%s '' 'Active jobs of %s' jobs '%s' cups.destination_job_num stacked %i %i\n", dest, dest, dest, netdata_priority++, netdata_update_every);
printf("DIMENSION pending '' absolute 1 1\n");
printf("DIMENSION held '' absolute 1 1\n");
printf("DIMENSION processing '' absolute 1 1\n");
- printf("CHART cups.job_size_%s '' 'Active jobs size of %s' KB '%s' cups.job_size stacked %i %i\n", dest, dest, dest, netdata_priority++, netdata_update_every);
+ printf("CHART cups.job_size_%s '' 'Active jobs size of %s' KB '%s' cups.destination_job_size stacked %i %i\n", dest, dest, dest, netdata_priority++, netdata_update_every);
printf("DIMENSION pending '' absolute 1 1\n");
printf("DIMENSION held '' absolute 1 1\n");
printf("DIMENSION processing '' absolute 1 1\n");
@@ -193,12 +193,12 @@ int collect_job_metrics(const DICTIONARY_ITEM *item, void *entry, void *data __m
"END\n",
name, jm->size_pending, jm->size_held, jm->size_processing);
} else {
- printf("CHART cups.job_num_%s '' 'Active jobs of %s' jobs '%s' cups.job_num stacked 1 %i 'obsolete'\n", name, name, name, netdata_update_every);
+ printf("CHART cups.job_num_%s '' 'Active jobs of %s' jobs '%s' cups.destination_job_num stacked 1 %i 'obsolete'\n", name, name, name, netdata_update_every);
printf("DIMENSION pending '' absolute 1 1\n");
printf("DIMENSION held '' absolute 1 1\n");
printf("DIMENSION processing '' absolute 1 1\n");
- printf("CHART cups.job_size_%s '' 'Active jobs size of %s' KB '%s' cups.job_size stacked 1 %i 'obsolete'\n", name, name, name, netdata_update_every);
+ printf("CHART cups.job_size_%s '' 'Active jobs size of %s' KB '%s' cups.destination_job_size stacked 1 %i 'obsolete'\n", name, name, name, netdata_update_every);
printf("DIMENSION pending '' absolute 1 1\n");
printf("DIMENSION held '' absolute 1 1\n");
printf("DIMENSION processing '' absolute 1 1\n");
diff --git a/collectors/cups.plugin/metrics.csv b/collectors/cups.plugin/metrics.csv
new file mode 100644
index 00000000..0262f58a
--- /dev/null
+++ b/collectors/cups.plugin/metrics.csv
@@ -0,0 +1,7 @@
+metric,scope,dimensions,unit,description,chart_type,labels,plugin,module
+cups.dests_state,,"idle, printing, stopped",dests,"Destinations by state",stacked,,cups.plugin,
+cups.dests_option,,"total, acceptingjobs, shared",dests,"Destinations by option",line,,cups.plugin,
+cups.job_num,,"pending, held, processing",jobs,"Active jobs",stacked,,cups.plugin,
+cups.job_size,,"pending, held, processing",KB,"Active jobs size",stacked,,cups.plugin,
+cups.destination_job_num,destination,"pending, held, processing",jobs,"Active jobs of {destination}",stacked,,cups.plugin,
+cups.destination_job_size,destination,"pending, held, processing",KB,"Active jobs size of {destination}",stacked,,cups.plugin, \ No newline at end of file