@@ -408,6 +408,8 @@ def _list_all_hosts(
408
408
short_help = "Include offline hosts" ,
409
409
),
410
410
],
411
+ needs_config = True ,
412
+ needs_checks = True ,
411
413
)
412
414
)
413
415
@@ -460,6 +462,8 @@ def _list_all_hosts_with_tags(tags: Sequence[TagID]) -> Sequence[HostName]:
460
462
argument_optional = True ,
461
463
short_help = "List hosts having certain tags" ,
462
464
long_help = ["Prints all hosts that have all of the specified tags at once." ],
465
+ needs_config = True ,
466
+ needs_checks = True ,
463
467
)
464
468
)
465
469
@@ -576,6 +580,7 @@ def _get_title(plugin_name: str) -> str:
576
580
long_option = "list-checks" ,
577
581
short_option = "L" ,
578
582
handler_function = mode_list_checks ,
583
+ needs_checks = True ,
579
584
needs_config = False ,
580
585
short_help = "List all available Check_MK checks" ,
581
586
)
@@ -745,6 +750,8 @@ def mode_dump_agent(options: Mapping[str, object], hostname: HostName) -> None:
745
750
"Does not work on clusters but only on real hosts. "
746
751
],
747
752
sub_options = [* _FETCHER_OPTIONS [:3 ], _SNMP_BACKEND_OPTION ],
753
+ needs_config = True ,
754
+ needs_checks = True ,
748
755
)
749
756
)
750
757
@@ -795,6 +802,8 @@ def mode_dump_hosts(hostlist: Iterable[HostName]) -> None:
795
802
"about one, several or all hosts. It shows all services, hostgroups, "
796
803
"contacts and other information about that host." ,
797
804
],
805
+ needs_config = True ,
806
+ needs_checks = True ,
798
807
)
799
808
)
800
809
@@ -898,6 +907,8 @@ def mode_update_dns_cache() -> None:
898
907
long_option = "update-dns-cache" ,
899
908
handler_function = mode_update_dns_cache ,
900
909
short_help = "Update IP address lookup cache" ,
910
+ needs_config = True , # really?
911
+ needs_checks = True , # really?
901
912
)
902
913
)
903
914
@@ -924,6 +935,8 @@ def mode_cleanup_piggyback() -> None:
924
935
long_option = "cleanup-piggyback" ,
925
936
handler_function = mode_cleanup_piggyback ,
926
937
short_help = "Cleanup outdated piggyback files" ,
938
+ needs_config = True ,
939
+ needs_checks = True ,
927
940
)
928
941
)
929
942
@@ -1140,6 +1153,8 @@ def mode_snmpwalk(options: dict, hostnames: list[str]) -> None:
1140
1153
"You can specify this option multiple times." ,
1141
1154
),
1142
1155
],
1156
+ needs_config = True ,
1157
+ needs_checks = True ,
1143
1158
)
1144
1159
)
1145
1160
@@ -1210,6 +1225,8 @@ def mode_snmpget(options: Mapping[str, object], args: Sequence[str]) -> None:
1210
1225
"no host is given, all known SNMP hosts are queried."
1211
1226
],
1212
1227
sub_options = [_SNMP_BACKEND_OPTION ],
1228
+ needs_config = True ,
1229
+ needs_checks = True ,
1213
1230
)
1214
1231
)
1215
1232
@@ -1322,14 +1339,15 @@ def mode_flush(hosts: list[HostName]) -> None:
1322
1339
argument = True ,
1323
1340
argument_descr = "HOST1 HOST2..." ,
1324
1341
argument_optional = True ,
1325
- needs_config = True ,
1326
1342
short_help = "Flush all data of some or all hosts" ,
1327
1343
long_help = [
1328
1344
"Deletes all runtime data belonging to a host. This includes "
1329
1345
"the inventorized checks, the state of performance counters, "
1330
1346
"cached agent output, and logfiles. Precompiled host checks "
1331
1347
"are not deleted." ,
1332
1348
],
1349
+ needs_config = True ,
1350
+ needs_checks = True ,
1333
1351
)
1334
1352
)
1335
1353
@@ -1414,6 +1432,8 @@ def mode_dump_nagios_config(args: Sequence[HostName]) -> None:
1414
1432
"of hosts. In that case the configuration is generated only for "
1415
1433
"that hosts (useful for debugging)." ,
1416
1434
],
1435
+ needs_config = True ,
1436
+ needs_checks = True ,
1417
1437
)
1418
1438
)
1419
1439
@@ -1475,6 +1495,8 @@ def mode_update() -> None:
1475
1495
"and the configuration for the Core helper processes is being created." ,
1476
1496
"The Agent Bakery is updating the agents." ,
1477
1497
],
1498
+ needs_config = True ,
1499
+ needs_checks = True ,
1478
1500
)
1479
1501
)
1480
1502
@@ -1526,6 +1548,8 @@ def mode_restart(args: Sequence[HostName]) -> None:
1526
1548
],
1527
1549
handler_function = mode_restart ,
1528
1550
short_help = "Create core config + core restart" ,
1551
+ needs_config = True ,
1552
+ needs_checks = True ,
1529
1553
)
1530
1554
)
1531
1555
@@ -1577,6 +1601,8 @@ def mode_reload(args: Sequence[HostName]) -> None:
1577
1601
],
1578
1602
handler_function = mode_reload ,
1579
1603
short_help = "Create core config + core reload" ,
1604
+ needs_config = True ,
1605
+ needs_checks = True ,
1580
1606
)
1581
1607
)
1582
1608
@@ -1977,6 +2003,8 @@ def register_mode_check_discovery(
1977
2003
"autodiscovery"
1978
2004
],
1979
2005
sub_options = [* _FETCHER_OPTIONS , _SNMP_BACKEND_OPTION ],
2006
+ needs_config = True ,
2007
+ needs_checks = True ,
1980
2008
)
1981
2009
)
1982
2010
@@ -2297,6 +2325,8 @@ def section_error_handling(
2297
2325
short_help = "Restrict discovery to host labels only" ,
2298
2326
),
2299
2327
],
2328
+ needs_config = True ,
2329
+ needs_checks = True ,
2300
2330
)
2301
2331
)
2302
2332
@@ -2543,6 +2573,8 @@ def register_mode_check(
2543
2573
_get_plugins_option (CheckPluginName ),
2544
2574
_option_detect_plugins ,
2545
2575
],
2576
+ needs_config = True ,
2577
+ needs_checks = True ,
2546
2578
)
2547
2579
)
2548
2580
@@ -2731,6 +2763,8 @@ def section_error_handling(
2731
2763
_get_plugins_option (InventoryPluginName ),
2732
2764
_option_detect_plugins ,
2733
2765
],
2766
+ needs_config = True ,
2767
+ needs_checks = True ,
2734
2768
)
2735
2769
)
2736
2770
@@ -3001,6 +3035,8 @@ def register_mode_inventory_as_check(
3001
3035
short_help = "Use monitoring state S for NW changes" ,
3002
3036
),
3003
3037
],
3038
+ needs_config = True ,
3039
+ needs_checks = True ,
3004
3040
)
3005
3041
)
3006
3042
@@ -3135,6 +3171,7 @@ def summarizer(host_name: HostName) -> CMKSummarizer:
3135
3171
"in the previous run" ,
3136
3172
],
3137
3173
sub_options = [* _FETCHER_OPTIONS , _SNMP_BACKEND_OPTION ],
3174
+ needs_checks = True ,
3138
3175
needs_config = False ,
3139
3176
)
3140
3177
)
0 commit comments