Compare commits
5 Commits
dc9dda1113
...
7bfa1e7c92
| Author | SHA1 | Date | |
|---|---|---|---|
|
7bfa1e7c92
|
|||
|
1cc4965ba6
|
|||
|
2fd36d4af9
|
|||
|
add86ecc52
|
|||
|
2b784c8caa
|
33
module.nix
Normal file
33
module.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{config, lib, pkgs, ...}:
|
||||
{
|
||||
options.printer_scraping = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the script to pull data from the printer"
|
||||
};
|
||||
timer = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "1m";
|
||||
description = "systemd timer for script execution";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.printer_scraping.enable {
|
||||
systemd.services."printer-scraping" = {
|
||||
description = "Pull printer stats and upload to influxdb";
|
||||
serviceConfig.Type = "oneshot";
|
||||
path = with pkgs; [yq curl];
|
||||
script = "exec ${./pull_info.sh}";
|
||||
};
|
||||
systemd.timers."printer-scraping" = {
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = "60s";
|
||||
OnUnitActiveSec = config.printer_scraping.timer;
|
||||
Unit = "printer-scraping.service";
|
||||
};
|
||||
};
|
||||
services.prometheus.pushgateway.enable = true; #Im not dealing with influx
|
||||
};
|
||||
}
|
||||
141
pull_info.sh
141
pull_info.sh
@@ -1,28 +1,129 @@
|
||||
echo "Get request cookie"
|
||||
#cookie=$(curl -D - -X GET http://192.168.1.42/wcd/index.html)
|
||||
cookie=$(cat request_example_1.txt) #testing
|
||||
cookie=$(echo "$cookie" | grep Set-Cookie | grep -oP "ID=\K[^.]+" )
|
||||
echo "$cookie"
|
||||
#!/usr/bin/env bash
|
||||
set -o pipefail
|
||||
|
||||
#Functions---------------
|
||||
get_cookie () {
|
||||
if [[ $1 == "-d" ]]; then
|
||||
cookie=$(cat request_example_1.txt)
|
||||
else
|
||||
cookie=$(curl -D - -X GET http://192.168.1.42/wcd/index.html)
|
||||
fi
|
||||
|
||||
exitCode="$?"
|
||||
if [[ $exitCode == "7" ]];
|
||||
then
|
||||
echo "Server offline"
|
||||
exit 0
|
||||
elif [[ $exitCode != "0" ]];
|
||||
then
|
||||
echo "Something went wrong"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cookie=$(echo "$cookie" | grep Set-Cookie | grep -oP "ID=\K[^.]+" )
|
||||
if [[ $cookie == "" ]]
|
||||
then
|
||||
echo "No cookie got!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
get_values () {
|
||||
local path="$1"
|
||||
local -n keys=$2
|
||||
local name="$3"
|
||||
|
||||
local_system_counter_data=$(echo "$system_counter_data" | jq "$path | .[]")
|
||||
for key in "${keys[@]}";
|
||||
do
|
||||
value=$(echo "$local_system_counter_data" |
|
||||
jq "select(.Type==\"$key\") | .Count" |
|
||||
sed 's/"//g'
|
||||
)
|
||||
valueStore=$(echo "$valueStore"; echo "$name"_"$key" "$value")
|
||||
done
|
||||
}
|
||||
get_values_DeviceStatus () {
|
||||
local -n keys=$1
|
||||
local name="$2"
|
||||
|
||||
local_system_counter_data=$(echo "$system_counter_data" | jq ".MFP.Common.DeviceStatus")
|
||||
for key in "${keys[@]}";
|
||||
do
|
||||
value=$(echo "$local_system_counter_data" |
|
||||
jq ".$key" |
|
||||
sed 's/"//g'
|
||||
)
|
||||
valueStore=$(echo "$valueStore"; echo "$name"_"$key" "$value")
|
||||
done
|
||||
|
||||
}
|
||||
get_values_consumables () {
|
||||
local -n keys=$1
|
||||
local name="$2"
|
||||
|
||||
local_system_consumables_data=$(echo "$system_consumables_data" | jq ".[] |.DeviceInfo.ConsumableList.Consumable | .[]")
|
||||
for key in "${keys[@]}";
|
||||
do
|
||||
value=$(
|
||||
echo "$local_system_consumables_data" |
|
||||
jq "select(.Name==\"$key\") | .CurrentLevel.LevelPer" |
|
||||
sed 's/"//g'
|
||||
)
|
||||
valueStore=$(echo "$valueStore"; echo "$name"_"${key//[^a-zA-Z_-]/_}" "$value")
|
||||
done
|
||||
}
|
||||
#End Functions----------
|
||||
|
||||
#Variables-----------------------
|
||||
system_counter_DeviceStatus_keys=("ScanStatus" "PrintStatus" "Processing" "NetworkErrorStatus" "KmSaasgw" "HddMirroringErrorStatus")
|
||||
system_counter_TotalCounter_keys=("Total" "DuplexTotal" "Document" "Paper" "TotalLarge" "PrintPageTotal" "PaperSizeA3" "PaperSizeA4" "PaperSizeB4" "PaperSizeB5" "PaperSizeOther" "Nin12in1" "PaperTypeNormal" "PaperTypeOther")
|
||||
system_counter_FullColorCounter_keys=("PrintPageTotal" "A3" "A4" "B4" "B5" "Other")
|
||||
system_counter_BlackCounter_keys=("PrintPageTotal" "A3" "A4" "B4" "B5" "Other")
|
||||
system_counter_DoubleColorCounter_keys=("PrintPageTotal" "A3" "A4" "B4" "B5" "Other")
|
||||
system_counter_CopyCounter_keys=("BwTotal" "FullColorTotal" "Total" "BwLarge" "FullColorLarge" "BiColorLarge")
|
||||
system_counter_PrintCounter_keys=("BwTotal" "FullColorTotal" "BiColorTotal" "Total" "BwLarge" "FullColorLarge" "BiColorLarge")
|
||||
system_counter_ScanFaxCounter_keys=("DocumentReadTotal" "DocumentReadLarge" "FaxReceive" "FaxSend")
|
||||
system_consumables_base_keys=("Toner (Yellow)" "Toner (Magenta)" "Toner (Cyan)" "Toner (Black)" "Drum Cartridge (Cyan)" "Developer Cartridge (Cyan)" "Drum Cartridge (Magenta)" "Developer Cartridge (Magenta)" "Drum Cartridge (Yellow)" "Developer Cartridge (Yellow)" "Drum Cartridge (Black)" "Developer Cartridge (Black)" "Fusing Unit" "Image Transfer Belt Unit" "Transfer Roller Unit")
|
||||
#End Variables-------------
|
||||
|
||||
echo "Start getting cookie"
|
||||
get_cookie "$@"
|
||||
echo "Cookie got"
|
||||
|
||||
echo "Start extract from system_counter"
|
||||
#data=$(curl -X GET http://192.168.1.42/wcd/system_counter.xml -H "Cookie: ID=\"$cookie\"")
|
||||
data=$(cat system_counter.xml)
|
||||
data=$(echo "$data" | xq ".MFP.Count.UserCounterInfo.TotalCounterList.TotalCounter | .[]")
|
||||
for key in "Total" "DuplexTotal" "Document" "Paper" "TotalLarge" "PaperSizeA3" "PaperSizeA4";
|
||||
do
|
||||
value=$(echo "$data" | jq "select(.Type==\"$key\") | .Count")
|
||||
echo "Key: $key; Value: $value"
|
||||
done
|
||||
if [[ $1 == "-d" ]]; then
|
||||
system_counter_data=$(cat system_counter.xml |xq)
|
||||
else
|
||||
system_counter_data=$(curl -X GET http://192.168.1.42/wcd/system_counter.xml -H "Cookie: ID=\"$cookie\"" |xq)
|
||||
fi
|
||||
|
||||
get_values ".MFP.Count.UserCounterInfo.TotalCounterList.TotalCounter" system_counter_TotalCounter_keys TotalCounter
|
||||
|
||||
get_values ".MFP.Count.UserCounterInfo.PaperSheetCounter.FullColorCounterList.FullColorCounter" system_counter_FullColorCounter_keys FullColorCounter
|
||||
|
||||
get_values ".MFP.Count.UserCounterInfo.PaperSheetCounter.BlackCounterList.BlackCounter" system_counter_BlackCounter_keys BlackCounter
|
||||
|
||||
get_values ".MFP.Count.UserCounterInfo.PaperSheetCounter.DoubleColorCounterList.DoubleColorCounter" system_counter_DoubleColorCounter_keys DoubleColorCounter
|
||||
|
||||
get_values ".MFP.Count.UserCounterInfo.CopyCounterList.CopyCounter" system_counter_CopyCounter_keys CopyCounter
|
||||
|
||||
get_values ".MFP.Count.UserCounterInfo.ScanFaxCounterList.ScanFaxCounter" system_counter_ScanFaxCounter_keys ScanFaxCounter
|
||||
|
||||
get_values_DeviceStatus system_counter_DeviceStatus_keys DeviceStatus
|
||||
|
||||
echo "Stop extract from system_counter"
|
||||
echo
|
||||
echo "Start extract from system_consumables"
|
||||
if [[ $1 == "-d" ]]; then
|
||||
system_consumables_data=$(cat system_consumables.xml |xq)
|
||||
else
|
||||
system_consumables_data=$(curl -X GET http://192.168.1.42/wcd/system_counter.xml -H "Cookie: ID=\"$cookie\"")
|
||||
fi
|
||||
|
||||
get_values_consumables system_consumables_base_keys Consumables
|
||||
|
||||
data=$(cat system_consumables.xml)
|
||||
data=$(echo "$data" | xq ".[] |.DeviceInfo.ConsumableList.Consumable | .[]")
|
||||
for key in "Toner (Yellow)" "Toner (Magenta)" "Toner (Cyan)" "Toner (Black)" "Drum Cartridge (Cyan)" "Developer Cartridge (Cyan)" "Drum Cartridge (Magenta)" "Developer Cartridge (Magenta)" "Drum Cartridge (Yellow)" "Developer Cartridge (Yellow)" "Drum Cartridge (Black)" "Developer Cartridge (Black)" "Fusing Unit" "Image Transfer Belt Unit" "Transfer Roller Unit";
|
||||
do
|
||||
value=$(echo "$data" | jq "select(.Name==\"$key\") | .CurrentLevel.LevelPer")
|
||||
echo "Key: $key; Level: $value"
|
||||
done
|
||||
echo "Stop extract from system_consumables"
|
||||
|
||||
echo "$valueStore" | curl --data-binary @- http://localhost:9091/metrics/job/printer
|
||||
echo "Success!"
|
||||
exit 0
|
||||
905
success.json
Normal file
905
success.json
Normal file
@@ -0,0 +1,905 @@
|
||||
{
|
||||
"status": "success",
|
||||
"data": [
|
||||
{
|
||||
"labels": {
|
||||
"job": "testing"
|
||||
},
|
||||
"last_push_successful": true,
|
||||
"push_failure_time_seconds": {
|
||||
"time_stamp": "2025-10-25T21:28:46.607692675+02:00",
|
||||
"type": "GAUGE",
|
||||
"help": "Last Unix time when changing this group in the Pushgateway failed.",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "testing"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"push_time_seconds": {
|
||||
"time_stamp": "2025-10-25T21:28:46.607692675+02:00",
|
||||
"type": "GAUGE",
|
||||
"help": "Last Unix time when changing this group in the Pushgateway succeeded.",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "testing"
|
||||
},
|
||||
"value": "1.7614205266076927e+09"
|
||||
}
|
||||
]
|
||||
},
|
||||
"test_1": {
|
||||
"time_stamp": "2025-10-25T21:28:46.607692675+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "testing"
|
||||
},
|
||||
"value": "3.5"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"BlackCounter_A3": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "3224"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BlackCounter_A4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "34326"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BlackCounter_B4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BlackCounter_B5": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BlackCounter_Other": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "5867"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BlackCounter_PrintPageTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "43430"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Developer_Cartridge__Black_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "71"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Developer_Cartridge__Cyan_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "83"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Developer_Cartridge__Magenta_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "83"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Developer_Cartridge__Yellow_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "83"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Drum_Cartridge__Black_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "76"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Drum_Cartridge__Cyan_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "93"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Drum_Cartridge__Magenta_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "16"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Drum_Cartridge__Yellow_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "32"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Fusing_Unit": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "71"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Image_Transfer_Belt_Unit": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "42"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Toner__Black_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "60"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Toner__Cyan_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Toner__Magenta_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "45"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Toner__Yellow_": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "98"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Consumables_Transfer_Roller_Unit": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "63"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CopyCounter_BiColorLarge": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CopyCounter_BwLarge": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "156"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CopyCounter_BwTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "2354"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CopyCounter_FullColorLarge": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "44"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CopyCounter_FullColorTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "1019"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CopyCounter_Total": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "3373"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DeviceStatus_HddMirroringErrorStatus": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "48"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DeviceStatus_KmSaasgw": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DeviceStatus_NetworkErrorStatus": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "48"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DeviceStatus_PrintStatus": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "140007"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DeviceStatus_Processing": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DeviceStatus_ScanStatus": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "210036"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DoubleColorCounter_A3": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "8"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DoubleColorCounter_A4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "8"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DoubleColorCounter_B4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DoubleColorCounter_B5": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DoubleColorCounter_Other": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DoubleColorCounter_PrintPageTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "16"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FullColorCounter_A3": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "16321"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FullColorCounter_A4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "43245"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FullColorCounter_B4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FullColorCounter_B5": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FullColorCounter_Other": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "2785"
|
||||
}
|
||||
]
|
||||
},
|
||||
"FullColorCounter_PrintPageTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "62355"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ScanFaxCounter_DocumentReadLarge": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "2711"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ScanFaxCounter_DocumentReadTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "20400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ScanFaxCounter_FaxReceive": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ScanFaxCounter_FaxSend": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_Document": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "157070"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_DuplexTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "41752"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_Nin12in1": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "11"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_Paper": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "105801"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PaperSizeA3": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "19553"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PaperSizeA4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "77579"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PaperSizeB4": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PaperSizeB5": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PaperSizeOther": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "8652"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PaperTypeNormal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "104059"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PaperTypeOther": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "1742"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_PrintPageTotal": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "147553"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_Total": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "147924"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalCounter_TotalLarge": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "UNTYPED",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "22784"
|
||||
}
|
||||
]
|
||||
},
|
||||
"labels": {
|
||||
"job": "printer"
|
||||
},
|
||||
"last_push_successful": true,
|
||||
"push_failure_time_seconds": {
|
||||
"time_stamp": "2025-10-25T21:33:36.797045164+02:00",
|
||||
"type": "GAUGE",
|
||||
"help": "Last Unix time when changing this group in the Pushgateway failed.",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"push_time_seconds": {
|
||||
"time_stamp": "2025-10-25T21:36:13.743122933+02:00",
|
||||
"type": "GAUGE",
|
||||
"help": "Last Unix time when changing this group in the Pushgateway succeeded.",
|
||||
"metrics": [
|
||||
{
|
||||
"labels": {
|
||||
"instance": "",
|
||||
"job": "printer"
|
||||
},
|
||||
"value": "1.761420973743123e+09"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user