3
3
"""
4
4
Description: Expose metrics from zypper updates and patches.
5
5
6
- The script can take 2 arguments: `--more` and `--less`.
6
+ The script can take 2 arguments: `--more` and `--less`.
7
7
The selection of the arguments change how many informations are going to be printed.
8
8
9
9
The `--more` is by default.
@@ -113,8 +113,8 @@ def print_reboot_required():
113
113
stderr = subprocess .DEVNULL ,
114
114
check = False )
115
115
116
- print ('# HELP node_reboot_required Node require reboot to activate installed updates or ' \
117
- 'patches. (0 = not needed, 1 = needed)' )
116
+ print ('# HELP node_reboot_required Node require reboot to activate installed updates or '
117
+ 'patches. (0 = not needed, 1 = needed)' )
118
118
print ('# TYPE node_reboot_required gauge' )
119
119
if result .returncode == 0 :
120
120
print ('node_reboot_required 0' )
@@ -228,7 +228,7 @@ def main(argv: Sequence[str] | None = None) -> int:
228
228
).stdout .decode ('utf-8' )
229
229
data_zypper_orphaned = __extract_orphaned_data (raw_zypper_orphaned )
230
230
231
- print ('# HELP zypper_update_pending zypper package update available from repository. (0 = not ' \
231
+ print ('# HELP zypper_update_pending zypper package update available from repository. (0 = not '
232
232
'available, 1 = available)' )
233
233
print ('# TYPE zypper_update_pending gauge' )
234
234
print_pending_updates (data_zypper_lu , args .all_info )
@@ -237,7 +237,7 @@ def main(argv: Sequence[str] | None = None) -> int:
237
237
print ('# TYPE zypper_updates_pending_total counter' )
238
238
print_updates_sum (data_zypper_lu )
239
239
240
- print ('# HELP zypper_patch_pending zypper patch available from repository. (0 = not available ' \
240
+ print ('# HELP zypper_patch_pending zypper patch available from repository. (0 = not available '
241
241
', 1 = available)' )
242
242
print ('# TYPE zypper_patch_pending gauge' )
243
243
print_pending_patches (data_zypper_lp , args .all_info )
@@ -246,21 +246,21 @@ def main(argv: Sequence[str] | None = None) -> int:
246
246
print ('# TYPE zypper_patches_pending_total counter' )
247
247
print_patches_sum (data_zypper_lp )
248
248
249
- print ('# HELP zypper_patches_pending_security_total zypper patches available with category ' \
249
+ print ('# HELP zypper_patches_pending_security_total zypper patches available with category '
250
250
'security total' )
251
251
print ('# TYPE zypper_patches_pending_security_total counter' )
252
252
print_patches_sum (data_zypper_lp ,
253
253
prefix = "zypper_patches_pending_security_total" ,
254
254
filters = {'Category' : 'security' })
255
255
256
- print ('# HELP zypper_patches_pending_security_important_total zypper patches available with ' \
256
+ print ('# HELP zypper_patches_pending_security_important_total zypper patches available with '
257
257
'category security severity important total' )
258
258
print ('# TYPE zypper_patches_pending_security_important_total counter' )
259
259
print_patches_sum (data_zypper_lp ,
260
260
prefix = "zypper_patches_pending_security_important_total" ,
261
261
filters = {'Category' : 'security' , 'Severity' : 'important' })
262
262
263
- print ('# HELP zypper_patches_pending_reboot_total zypper patches available which require ' \
263
+ print ('# HELP zypper_patches_pending_reboot_total zypper patches available which require '
264
264
'reboot total' )
265
265
print ('# TYPE zypper_patches_pending_reboot_total counter' )
266
266
print_patches_sum (data_zypper_lp ,
0 commit comments