Send metrics to prometheus pushgateway

This commit is contained in:
2025-10-25 21:40:23 +02:00
parent 1cc4965ba6
commit 7bfa1e7c92
2 changed files with 907 additions and 1 deletions

View File

@@ -124,5 +124,6 @@ get_values_consumables system_consumables_base_keys Consumables
echo "Stop extract from system_consumables" echo "Stop extract from system_consumables"
echo "$valueStore" echo "$valueStore" | curl --data-binary @- http://localhost:9091/metrics/job/printer
echo "Success!"
exit 0 exit 0

905
success.json Normal file
View 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"
}
]
}
}
]
}