summaryrefslogtreecommitdiffstats
path: root/itl/plugins-contrib.d/databases.conf
blob: 29b12463f20a90333fbbc1d670f1ce97faecd8e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */

object CheckCommand "mssql_health" {
	import "ipv4-or-ipv6"

	command = [ PluginContribDir + "/check_mssql_health" ]

	arguments = {
		"--hostname" = {
			value = "$mssql_health_hostname$"
			description = "the database server's hostname"
		}
		"--username" = {
			value = "$mssql_health_username$"
			description = "the mssql db user"
		}
		"--password" = {
			value = "$mssql_health_password$"
			description = "the mssql db user's password"
		}
		"--port" = {
			value = "$mssql_health_port$"
			description = "the database's port"
		}
		"--server" = {
			value = "$mssql_health_server$"
			description = "the name of a predefined connection"
		}
		"--currentdb" = {
			value = "$mssql_health_currentdb$"
			description = "the name of a database which is used as the current database for the connection"
		}
		"--offlineok" = {
			set_if = "$mssql_health_offlineok$"
			description = "if offline databases are perfectly ok for you"
		}
		"--nooffline" = {
			set_if = "$mssql_health_nooffline$"
			description = "Skip the offline databases"
		}
		"--dbthresholds" = {
			value = "$mssql_health_dbthresholds$"
			description = "Read thresholds from a database table"
		}
		"--notemp" = {
			set_if = "$mssql_health_notemp$"
			description = "Ignore temporary databases/tablespaces"
		}
		"--commit" = {
			set_if = "$mssql_health_commit$"
			description = "turns on autocommit for the dbd::sybase module"
		}
		"--method" = {
			value = "$mssql_health_method$"
			description = "how the plugin should connect to the database (dbi for using DBD::Sybase (default), sqlrelay for the SQLRelay proxy)"
		}
		"--mode" = {
			value = "$mssql_health_mode$"
			description = "the mode of the plugin"
		}
		"--regexp" = {
			set_if = "$mssql_health_regexp$"
			description = "name will be interpreted as a regular expression"
		}
		"--warning" = {
			value = "$mssql_health_warning$"
			description = "the warning range"
		}
		"--critical" = {
			value = "$mssql_health_critical$"
			description = "the critical range"
		}
		"--warningx" = {
			value = "$mssql_health_warningx$"
			description = "The extended warning thresholds"
		}
		"--criticalx" = {
			value = "$mssql_health_criticalx$"
			description = "The extended critical thresholds"
		}
		"--units" = {
			value = "$mssql_health_units$"
			description = "This is used for a better output of mode=sql and for specifying thresholds for mode=tablespace-free"
		}
		"--name" = {
			value = "$mssql_health_name$"
			description = "the name of the database etc depending on the mode"
		}
		"--name2" = {
			value = "$mssql_health_name2$"
			description = "if name is a sql statement, name2 can be used to appear in the output and the performance data"
		}
		"--name3" = {
			value = "$mssql_health_name3$"
			description = "The tertiary name of a component"
		}
		"--extra-opts" = {
			value = "$mssql_health_extraopts$"
			description = "read command line arguments from an external file"
		}
		"--blacklist" = {
			value = "$mssql_health_blacklist$"
			description = "Blacklist some (missing/failed) components"
		}
		"--mitigation" = {
			value = "$mssql_health_mitigation$"
			description = "The parameter allows you to change a critical error to a warning."
		}
		"--lookback" = {
			value = "$mssql_health_lookback$"
			description = "The amount of time you want to look back when calculating average rates"
		}
		"--environment" = {
			value = "$mssql_health_environment$"
			description = "Add a variable to the plugin's environment."
		}
		"--negate" = {
			value = "$mssql_health_negate$"
			description = "Emulate the negate plugin. --negate warning=critical --negate unknown=critical."
		}
		"--morphmessage" = {
			value = "$mssql_health_morphmessage$"
			description = "Modify the final output message."
		}
		"--morphperfdata" = {
			value = "$mssql_health_morphperfdata$"
			description = "The parameter allows you to change performance data labels."
		}
		"--selectedperfdata" = {
			value = "$mssql_health_selectedperfdata$"
			description = "The parameter allows you to limit the list of performance data."
		}
		"--report" = {
			value = "$mssql_health_report$"
			description = "Report can be used to output only the bad news (short,long,html)"
		}
		"--multiline" = {
			value = "$mssql_health_multiline$"
			description = "Multiline output."
		}
		"--with-mymodules-dyn-dir" = {
			value = "$mssql_health_withmymodulesdyndir$"
			description = "Add-on modules for the my-modes will be searched in this directory."
		}
		"--statefilesdir" = {
			value = "$mssql_health_statefilesdir$"
			description = "An alternate directory where the plugin can save files."
		}
		"--isvalidtime" = {
			value = "$mssql_health_isvalidtime$"
			description = "Signals the plugin to return OK if now is not a valid check time."
		}
		"--timeout" = {
			value = "$mssql_health_timeout$"
			description = "Seconds before plugin times out (default: 15)"
		}
	}

	vars.mssql_health_regexp = false
	vars.mssql_health_offlineok = false
	vars.mssql_health_commit = false
	vars.mssql_health_notemp = false
	vars.mssql_health_nooffline = false
	vars.mssql_health_report = "short"
}

object CheckCommand "mysql_health" {
	import "ipv4-or-ipv6"

	command = [ PluginContribDir + "/check_mysql_health" ]

	arguments = {
		"--hostname" = {
			value = "$mysql_health_hostname$"
			description = "the database server's hostname"
		}
		"--port" = {
			value = "$mysql_health_port$"
			description = "the database's port"
		}
		"--socket" = {
			value = "$mysql_health_socket$"
			description = "the database's unix socket"
		}
		"--username" = {
			value = "$mysql_health_username$"
			description = "the mysql db user"
		}
		"--password" = {
			value = "$mysql_health_password$"
			description = "the mysql db user's password"
		}
		"--database" = {
			value = "$mysql_health_database$"
			description = "the database's name"
		}
		"--warning" = {
			value = "$mysql_health_warning$"
			description = "the warning range"
		}
		"--critical" = {
			value = "$mysql_health_critical$"
			description = "the critical range"
		}
		"--warningx" = {
			value = "$mysql_health_warningx$"
			description = "The extended warning thresholds"
		}
		"--criticalx" = {
			value = "$mysql_health_criticalx$"
			description = "The extended critical thresholds"
		}
		"--mode" = {
			value = "$mysql_health_mode$"
			description = "the mode of the plugin"
		}
		"--method" = {
			value = "$mysql_health_method$"
			description = "how the plugin should connect to the database (dbi for using DBD::mysql (default), mysql for using the mysql-Tool)"
		}
		"--commit" = {
			value = "$mysql_health_commit$"
			description = "turns on autocommit for the dbd::* module"
		}
		"--notemp" = {
			value = "$mysql_health_notemp$"
			description = "Ignore temporary databases/tablespaces"
		}
		"--nooffline" = {
			value = "$mysql_health_nooffline$"
			description = "skip the offline databases"
		}
		"--regexp" = {
			value = "$mysql_health_regexp$"
			description = " Parameter name/name2/name3 will be interpreted as (perl) regular expression."
		}
		"--name" = {
			value = "$mysql_health_name$"
			description = "The name of a specific component to check"
		}
		"--name2" = {
			value = "$mysql_health_name2$"
			description = "The secondary name of a component"
		}
		"--name3" = {
			value = "$mysql_health_name3$"
			description = "The tertiary name of a component"
		}
		"--units" = {
			value = "$mysql_health_units$"
			description = "This is used for a better output of mode=sql and for specifying thresholds for mode=tablespace-free"
		}
		"--labelformat" = {
			value = "$mysql_health_labelformat$"
			description = "one of pnp4nagios (which is the default) or groundwork"
		}
		"--extra-opts" = {
			value = "$mysql_health_extraopts$"
			description = "Read command line arguments from an external file."
		}
		"--blacklist" = {
			value = "$mysql_health_blacklist$"
			description = "Blacklist some (missing/failed) components"
		}
		"--mitigation" = {
			value = "$mysql_health_mitigation$"
			description = "The parameter allows you to change a critical error to a warning."
		}
		"--lookback" = {
			value = "$mysql_health_lookback$"
			description = "The amount of time you want to look back when calculating average rates."
		}
		"--environment" = {
			value = "$mysql_health_environment$"
			description = "Add a variable to the plugin's environment."
		}
		"--morphmessage" = {
			value = "$mysql_health_morphmessage$"
			description = "Modify the final output message."
		}
		"--morphperfdata" = {
			value = "$mysql_health_morphperfdata$"
			description = "The parameter allows you to change performance data labels."
		}
		"--selectedperfdata" = {
			value = "$mysql_health_selectedperfdata$"
			description = "The parameter allows you to limit the list of performance data."
		}
		"--report" = {
			value = "$mysql_health_report$"
			description = "Can be used to shorten the output."
		}
		"--multiline" = {
			value = "$mysql_health_multiline$"
			description = "Multiline output."
		}
		"--negate" = {
			value = "$mysql_health_negate$"
			description = "Emulate the negate plugin. --negate warning=critical --negate unknown=critical."
		}
		"--with-mymodules-dyn-dir" = {
			value = "$mysql_health_withmymodulesdyndir$"
			description = "Add-on modules for the my-modes will be searched in this directory."
		}
		"--statefilesdir" = {
			value = "$mysql_health_statefilesdir$"
			description = "An alternate directory where the plugin can save files."
		}
		"--isvalidtime" = {
			value = "$mysql_health_isvalidtime$"
			description = "Signals the plugin to return OK if now is not a valid check time."
		}
		"--timeout" = {
			value = "$mysql_health_timeout$"
			description = "plugin timeout. Default is 60 seconds"
		}
	}

	vars.mysql_health_hostname = "$check_address$"
}

object CheckCommand "db2_health" {
	import "ipv4-or-ipv6"

        command = [ PluginContribDir + "/check_db2_health" ]

        arguments = {
                "--hostname" = {
                        value = "$db2_health_hostname$"
                        set_if = "$db2_health_not_catalogued$"
                        description = "the host to connect"
                        order = -2
                }
                "--database" = {
                        value = "$db2_health_database$"
                        description = "the database to connect"
                        order = 0
                }
                "--username" = {
                        value = "$db2_health_username$"
                        description = "the db2 user"
                        order = 1
                }
                "--password" = {
                        value = "$db2_health_password$"
                        description = "the db2 user's password"
                        order = 2
                }
                "--port" = {
                        value = "$db2_health_port$"
                        description = "the db2 port for connection"
                        order = -1
                }
                "--warning" = {
                        value = "$db2_health_warning$"
                        description = "the warning range"
                        order = 5
                }
                "--critical" = {
                        value = "$db2_health_critical$"
                        description = "the critical range"
                        order = 6
                }
                "--mode" = {
                        value = "$db2_health_mode$"
                        description = "the mode of the plugin"
                        order = 3
                }
                "--name" = {
                        value = "$db2_health_name$"
                        description = "the name of the tablespace, datafile, wait event, latch, enqueue, or sql statement depending on the mode"
                        order = 4
                }
                "--name2" = {
                        value = "$db2_health_name2$"
                        description = "if name is a sql statement, name2 can be used to appear in the output and the performance data"
                        order = 7
                }
                "--regexp" = {
                        set_if = "$db2_health_regexp$"
                        description = "name will be interpreted as a regular expression"
                }
                "--units" = {
                        value = "$db2_health_units$"
                        description = "This is used for a better output of mode=sql and for specifying thresholds for mode=tablespace-free"
                }
                "--maxinactivity" = {
                        value = "$db2_health_maxinactivity$"
                        description = "used for the maximum amount of time a certain event has not happened."
                }
		"--mitigation" = {
                        value = "$db2_health_mitigation$"
                        description = "let you classify the severity of an offline tablespace."
                }
                "--lookback" = {
                        value = "$db2_health_lookback$"
                        description = "How many days iin the past db2_health check should look back to calculate exitcode."
                }
                "--report" = {
                        value = "$db2_health_report$"
                        description = "Report can be used to output only the bad news (short,long,html)"
                }
        }

        env = {
                "DB2_HOME" = "$db2_health_env_db2_home$"
                "DB2_VERSION" = "$db2_health_env_db2_version$"
        }

        vars.db2_health_regexp = false
        vars.db2_health_not_catalogued = true
        vars.db2_health_hostname = "$check_address$"
        vars.db2_health_report = "short"

        vars.db2_health_env_db2_home = "/opt/ibm/db2/V10.5"
        vars.db2_health_env_db2_version = "10.5"
}

object CheckCommand "oracle_health" {
	import "ipv4-or-ipv6"

	command = [ PluginContribDir + "/check_oracle_health" ]

	arguments = {
		"--connect" = {
			value = "$oracle_health_connect$"
			description = "the connect string"
		}
		"--username" = {
			value = "$oracle_health_username$"
			description = "the oracle user"
		}
		"--password" = {
			value = "$oracle_health_password$"
			description = "the oracle user's password"
		}
		"--warning" = {
			value = "$oracle_health_warning$"
			description = "the warning range"
		}
		"--critical" = {
			value = "$oracle_health_critical$"
			description = "the critical range"
		}
		"--mode" = {
			value = "$oracle_health_mode$"
			description = "the mode of the plugin"
		}
		"--method" = {
			value = "$oracle_health_method$"
			description = "how the plugin should connect to the database (dbi for using DBD::Oracle (default), sqlplus for using the sqlplus-Tool)"
		}
		"--name" = {
			value = "$oracle_health_name$"
			description = "the name of the tablespace, datafile, wait event, latch, enqueue, or sql statement depending on the mode"
		}
		"--name2" = {
			value = "$oracle_health_name2$"
			description = "if name is a sql statement, name2 can be used to appear in the output and the performance data"
		}
		"--regexp" = {
			set_if = "$oracle_health_regexp$"
			description = "name will be interpreted as a regular expression"
		}
		"--units" = {
			value = "$oracle_health_units$"
			description = "This is used for a better output of mode=sql and for specifying thresholds for mode=tablespace-free"
		}
		"--ident" = {
			set_if = "$oracle_health_ident$"
			description = "outputs instance and database names"
		}
		"--commit" = {
			set_if = "$oracle_health_commit$"
			description = "turns on autocommit for the dbd::oracle module"
		}
		"--noperfdata" = {
			set_if = "$oracle_health_noperfdata$"
			description = "do not output performance data"
		}
		"--timeout" = {
			value = "$oracle_health_timeout$"
			description = "plugin timeout. Default is 60 seconds"
		}
		"--report" = {
			value = "$oracle_health_report$"
			description = "select the plugin output format. Can be short, long or html. Default is long"
		}
		"--notemp" = {
			set_if = "$oracle_health_notemp$"
			description = "exclude temporary and system tables"
		}
	}

	env = {
		"ORACLE_HOME" = "$oracle_home$"
		"LD_LIBRARY_PATH" = "$oracle_ld_library_path$"
		"TNS_ADMIN" = "$oracle_tns_admin$"
	}

	vars.oracle_health_regexp = false
	vars.oracle_health_ident = false
	vars.oracle_health_commit = false
	vars.oracle_health_noperfdata = false
	vars.oracle_health_report = "long"
	vars.oracle_health_notemp = false

	vars.oracle_home = "/usr/lib/oracle/11.2/client64/lib"
	vars.oracle_ld_library_path = "/usr/lib/oracle/11.2/client64/lib"
	vars.oracle_tns_admin = ConfigDir + "/plugin-configs"
}

object CheckCommand "postgres" {
	import "ipv4-or-ipv6"

	command = [ PluginContribDir + "/check_postgres.pl" ]

	arguments = {
		"-H" = {
			value = "$postgres_host$"
			set_if = {{ macro("$postgres_unixsocket$") == false }}
			description = "hostname(s) to connect to; defaults to none (Unix socket)"
		}
		"-p" = {
			value = "$postgres_port$"
			description = "port(s) to connect to; defaults to 5432"
		}
		"-db" = {
			value = "$postgres_dbname$"
			description = "database name(s) to connect to; defaults to 'postgres' or 'template1'"
		}
		"-u" = {
			value = "$postgres_dbuser$"
			description = "database user(s) to connect as; defaults to 'postgres'"
		}
		"--dbpass" = {
			value = "$postgres_dbpass$"
			description = "database password(s); use a .pgpass file instead when possible"
		}
		"--dbservice" = {
			value = "$postgres_dbservice$"
			description = "service name to use inside of pg_service.conf"
		}
		"-w" = {
			value = "$postgres_warning$"
			description = "the warning threshold, range depends on the action"
		}
		"-c" = {
			value = "$postgres_critical$"
			description = "the critical threshold, range depends on the action"
		}
		"--include" = {
			value = "$postgres_include$"
			description = "name(s) items to specifically include (e.g. tables), depends on the action"
		}
		"--exclude" = {
			value = "$postgres_exclude$"
			description = "name(s) items to specifically exclude (e.g. tables), depends on the action"
		}
		"--includeuser" = {
			value = "$postgres_includeuser$"
			description = "include objects owned by certain users"
		}
		"--excludeuser" = {
			value = "$postgres_excludeuser$"
			description = "exclude objects owned by certain users"
		}
		"--assume-standby-mode" = {
			set_if = "$postgres_standby$"
			description = "assume that server in continious WAL recovery mode"
		}
		"--assume-prod" = {
			set_if = "$postgres_production$"
			description = "assume that server in production mode"
		}
		"--action" = {
			value = "$postgres_action$"
			description = "determines the test executed"
		}
		"--query" = {
			value = "$postgres_query$"
			description = "query for custom_query action"
		}
		"--valtype" = {
			value = "$postgres_valtype$"
			description = "determines the result type for custom_query action"
		}
		"--reverse" = {
			set_if = "$postgres_reverse$"
			description = "reverses warning and critical for custom_query action"
		}
		"--tempdir" = {
			value = "$postgres_tempdir$"
			description = "specify directory for temporary files. default depends on the OS"
		}
		"--datadir" = {
			value = "$postgres_datadir$"
			description = "location of the PostgreSQL data directory"
		}
		"--language" = {
			value = "$postgres_language$"
			description = "language to use for messages"
		}
		"--perflimit" = {
			value = "$postgres_perflimit$"
			description = "limit the number of performance data to report"
		}
	}

	env = {
		"PGCONTROLDATA" = "$postgres_pgcontroldata$"
	}

	vars.postgres_host = "$check_address$"
	vars.postgres_standby = false
	vars.postgres_production = false
	vars.postgres_unixsocket = false
}

object CheckCommand "mongodb" {
	import "ipv4-or-ipv6"

	command = [ PluginContribDir + "/check_mongodb.py" ]

	arguments = {
		"-H" = {
			value = "$mongodb_host$"
			description = "The hostname you want to connect to"
		}
		"-P" = {
			value = "$mongodb_port$"
			description = "The port mongodb is runnung on"
		}
		"-u" = {
			value = "$mongodb_user$"
			description = "The username you want to login as"
		}
		"-p" = {
			value = "$mongodb_passwd$"
			description = "The password you want to use for that user"
		}
		"-a" = {
			value = "$mongodb_authdb$"
			description = "The database you want to authenticate against"
		}
		"-A" = {
			value = "$mongodb_action$"
			description = "The action you want to take"
		}
		"-c" = {
			value = "$mongodb_collection$"
			description = "Specify the collection to check"
		}
		"-T" = {
			value = "$mongodb_sampletime$"
			description = "Time used to sample number of pages faults"
		}
		"-q" = {
			value = "$mongodb_querytype$"
			description = "The query type to check [query|insert|update|delete|getmore|command] from queries_per_second"
		}
		"--database" = {
			value = "$mongodb_database$"
			description = "Specify the database to check"
		}
		"-D" = {
			set_if = "$mongodb_perfdata$"
			description = "Enable output of Nagios performance data"
		}
		"--max-lag" = {
			set_if = "$mongodb_maxlag$"
			description = "Get max replication lag (for replication_lag action only)"
		}
		"--mapped-memory" = {
			set_if = "$mongodb_mappedmemory$"
			description = "Get mapped memory instead of resident (if resident memory can not be read)"
		}
		"--ssl" = {
			set_if = "$mongodb_ssl$"
			description = "Connect using SSL"
		}
		"--ssl-ca-cert-file" = {
			value = "$mongodb_ssl_ca_cert_file$"
			description = "Path to certificate authority file for SSL"
		}
		"--replicaset" = {
			value = "$mongodb_replicaset$"
			set_if = "$mongodb_replcheck$"
			description = "Connect to replicaset"
		}
		"--all-databases" = {
			set_if = "$mongodb_alldatabases$"
			description = "Check all databases (action database_size)"
		}
		"-C" = {
			value = "$mongodb_critical$"
			description = "The critical threshold we want to set"
		}
		"-W" = {
			value = "$mongodb_warning$"
			description = "The warning threshold we want to set"
		}
		"--disable_retry_writes" = {
			set_if = "$mongodb_disableretrywrites$"
			description = "Disable Retry Writes"
		}
	}

	vars.mongodb_host = {{
		var mongodbAddress = macro("$mongodb_address$")
		var checkAddress = macro("$check_address$")

		if (mongodbAddress) {
			log(LogWarning, "CheckerComponent", "The attribute 'mongodb_address' is deprecated, use 'mongodb_host' instead.")
			return mongodbAddress
		} else {
			return checkAddress
        }
	}}

	vars.mongodb_perfdata = true
	vars.mongodb_action = "connections"
}

object CheckCommand "elasticsearch" {
	import "ipv4-or-ipv6"

	command = [ PluginContribDir + "/check_elasticsearch" ]

	arguments = {
		"--failure-domain" = {
			value = "$elasticsearch_failuredomain$"
			description = "A comma-separated list of ElasticSearch attributes that make up your cluster's failure domain"
		}
		"--host" = {
			value = "$elasticsearch_host$"
			description = "Hostname or network address to probe, defaults to 'localhost'"
		}
		"--master-nodes" = {
			value = "$elasticsearch_masternodes$"
			description = "Issue a warning if the number of master-eligible nodes in the cluster drops below this number. By default, do not monitor the number of nodes in the cluster"
		}
		"--port" = {
			value = "$elasticsearch_port$"
			description = "TCP port to probe, defaults to 9200"
		}
		"--prefix" = {
			value = "$elasticsearch_prefix$"
			description = "Optional prefix for the ElasticSearch API, defaults to ''"
		}
		"--yellow-critical" = {
			value = "TRUE"
			set_if = "$elasticsearch_yellowcritical$"
			description = "Instead of issuing a 'warning' for a yellow cluster state, issue a 'critical' alert"
		}
	}

	vars.elasticsearch_host = "$check_address$"
	vars.elasticsearch_yellowcritical = false
}

object CheckCommand "redis" {
	import "ipv4-or-ipv6"

	command = [ PluginContribDir + "/check_redis.pl" ]

	arguments = {
		"--hostname" = {
			value = "$redis_hostname$"
			description = "Hostname or IP Address to check."
		}
		"--port" = {
			value = "$redis_port$"
			description = "Port number (default: 6379)."
		}
		"--database" = {
			value = "$redis_database$"
			description = "Optional database name (usually a number), needed for redis_query."
		}
		"--password" = {
			value = "$redis_password$"
			description = "Password for Redis authentication. Safer alternative is to put them in a file and use redis_credentials."
		}
		"--credentials" = {
			value = "$redis_credentials$"
			description = "Credentials file to read for Redis authentication."
		}
		"--timeout" = {
			value = "$redis_timeout$"
			description = "Allows to set timeout for execution of this plugin."
		}
		"--variables" = {
			value = "$redis_variables$"
			description = "List of variables from info data to do threshold checks on."
		}
		"--warn" = {
			value = "$redis_warn$"
			description = "This option can only be used if redis_variables is used and number of values listed here must exactly match number of variables specified."
		}
		"--crit" = {
			value = "$redis_crit$"
			description = "This option can only be used if redis_variables is used and number of values listed here must exactly match number of variables specified."
		}
		"--perfparse" = {
			set_if = "$redis_perfparse$"
			description = "This should only be used with variables and causes variable data not only to be printed as part of main status line but also as perfparse compatible output."
		}
		"--perfvars" = {
			value = "$redis_perfvars$"
			description = "This allows to list variables which values will go only into perfparse output (and not for threshold checking)."
		}
		"--prev_perfdata" = {
			value = "$service.perfdata$"
			set_if = "$redis_prev_perfdata$"
			description = "Previous performance data used to calculate rate of change for counter statistics variables and for proper calculation of hitrate."
		}
		"--rate_label" = {
			value = "$redis_rate_label$"
			description = "Prefix or Suffix label used to create a new variable which has rate of change of another base variable."
		}
		"--query" = {
			value = "$redis_query$"
			repeat_key = true
			description = "Option specifies key to query and optional variable name to assign the results to after. See the help output of the plugin for the detailed format."
		}
		"--option" = {
			value = "$redis_option$"
			repeat_key = true
			description = "Specifiers are separated by , and must include NAME or PATTERN. See the help output of the plugin for the detailed format."
		}
		"--response_time" = {
			value = "$redis_response_time$"
			description = "If this is used plugin will measure and output connection response time in seconds. With perfparse this would also be provided on perf variables."
		}
		"--hitrate" = {
			value = "$redis_hitrate$"
			description = "Calculates Hitrate."
		}
		"--memory_utilization" = {
			value = "$redis_memory_utilization$"
			description = "This calculates percent of total memory on system used by redis."
		}
		"--total_memory" = {
			value = "$redis_total_memory$"
			description = "Amount of memory on a system for memory utilization calculations above."
		}
		"--replication_delay" = {
			value = "$redis_replication_delay$"
			description = "Allows to set threshold on replication delay info."
		}
	}

	vars.redis_hostname = "$check_address$"
	vars.redis_perfparse = false
	vars.redis_prev_perfdata = false
}

object CheckCommand "proxysql" {
	import "plugin-check-command"
	command = [ PluginContribDir + "/check_proxysql" ]

	arguments = {
		"--user" = {
			value = "$proxysql_user$"
			description = "ProxySQL admin username (default=admin)"
		}
		"--password" = {
			value = "$proxysql_password$"
			description = "ProxySQL admin password (default=admin)"
		}
		"--host" = {
			value = "$proxysql_host$"
			description = "ProxySQL hostname / IP (default=127.0.0.1)"
		}
		"--port" = {
			value = "$proxysql_port$"
			description = "ProxySQL admin port (default=6032)"
		}
		"--defaults-file" = {
			value = "$proxysql_defaultfile$"
			description = "ProxySQL defaults file"
		}
		"--type" = {
			value = "$proxysql_type$"
			description = "ProxySQL check type (one of conns,hg,rules,status,var)"
			required = true
		}
		"--name" = {
			value = "$proxysql_name$"
			description = "ProxySQL variable name to check"
		}
		"--lower" = {
			value = "$proxysql_lower$"
			description = "Alert if ProxySQL value are LOWER than defined WARN / CRIT thresholds (only applies to 'var' check type)"
		}
		"--runtime" = {
			value = "$proxysql_runtime$"
			description = "Force ProxySQL Nagios check to query the runtime_mysql_XXX tables rather than the mysql_XXX tables"
		}
		"--warning" = {
			value = "$proxysql_warning$"
			description = "Warning threshold"
		}
		"--critical" = {
			value = "$proxysql_critical$"
			description = "Critical threshold"
		}
		"--include-hostgroup" = {
			value = "$proxysql_include_hostgroup$"
			description = "ProxySQL hostgroup(s) to include (only applies to '--type hg' checks, accepts comma-separated list)"
		}
		"--ignore-hostgroup" = {
			value = "$proxysql_ignore_hostgroup$"
			description = "ProxySQL hostgroup(s) to ignore (only applies to '--type hg' checks, accepts comma-separated list)"
		}
	}
}

object CheckCommand "memcached" {
	command = [ PluginContribDir + "/check_memcached" ]

	arguments = {
		"-H" = {
			value = "$memcached_hostname$"
			required = true
			description = "Hostname or IP address (required) optional ':port' overrides -p"
		}
		"-p" = {
			value = "$memcached_port$"
			description = "Port number (default: 11211)"
		}
		"-v" = {
			set_if = "$memcached_verbose$"
			description = "verbose messages"
		}
		"-n" = {
			value = "$memcached_keep$"
			description = "Keep up to this many items in the history object in memcached (default: 30)"
		}
		"-T" = {
			value = "$memcached_minimum_stat_interval$"
			description = "Minimum time interval (in minutes) to use to analyse stats. (default: 30)"
		}
		"-w" = {
			value = "$memcached_warning_hits_misses$"
			description = "Generate warning if quotient of hits/misses falls below this value (default: 2.0)"
		}
		"-E" = {
			value = "$memcached_warning_evictions$"
			description = "Generate warning if number of evictions exceeds this threshold. 0=disable. (default: 10)"
		}
		"-t" = {
			value = "$memcached_timeout$"
			description = "timeout in seconds (default: 1.0)"
		}
		"-k" = {
			value = "$memcached_key$"
			description = "key name for history object (default: check_memcached)"
		}
		"-K" = {
			value = "$memcached_expiry$"
			description = "expiry time in seconds for history object (default: 7200)"
		}
		"-r" = {
			set_if = "$memcached_performance_output$"
			description = "output performance statistics as rate-per-minute figures (better suited to pnp4nagios)"
		}
	}

	vars.memcached_hostname = "127.0.0.1"
	vars.memcached_minimum_stat_interval = "10"
	vars.memcached_performance_output = true
}