Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit 8ad8ec4

Browse files
committed
Added docs part to pmp-check-mongo.py
1 parent 1d6d0d4 commit 8ad8ec4

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

nagios/bin/pmp-check-mongo.py

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,3 +521,74 @@ def check_repl_lag(self, args, warning_level, critical_level):
521521
#
522522
if __name__ == "__main__":
523523
sys.exit(main(sys.argv[1:]))
524+
525+
# ############################################################################
526+
# Documentation
527+
# ############################################################################
528+
"""
529+
=pod
530+
531+
=head1 NAME
532+
533+
pmp-check-mongo.py - MongoDB Nagios check script.
534+
535+
=head1 SYNOPSIS
536+
537+
Usage: pmp-check-mongo.py [options]
538+
539+
Options:
540+
-h, --help show this help message and exit
541+
-H HOST, --host=HOST The hostname you want to connect to
542+
-P PORT, --port=PORT The port mongodb is running on
543+
-u USER, --user=USER The username you want to login as
544+
-p PASSWD, --password=PASSWD
545+
The password you want to use for that user
546+
-W WARNING, --warning=WARNING
547+
The warning threshold you want to set
548+
-C CRITICAL, --critical=CRITICAL
549+
The critical threshold you want to set
550+
-A ACTION, --action=ACTION
551+
The action you want to take. Valid choices are
552+
(check_connections, check_election, check_lock_pct,
553+
check_repl_lag, check_flushing, check_total_indexes,
554+
check_balance, check_queues, check_cannary_test,
555+
check_have_primary, check_oplog, check_index_ratio,
556+
check_connect) Default: check_connect
557+
-s SSL, --ssl=SSL Connect using SSL
558+
-r REPLICASET, --replicaset=REPLICASET
559+
Connect to replicaset
560+
-c COLLECTION, --collection=COLLECTION
561+
Specify the collection in check_cannary_test
562+
-d DATABASE, --database=DATABASE
563+
Specify the database in check_cannary_test
564+
-q QUERY, --query=QUERY
565+
Specify the query in check_cannary_test
566+
--statusfile=STATUS_FILENAME
567+
File to current store state data in for delta checks
568+
--backup-statusfile=STATUS_FILENAME_BACKUP
569+
File to previous store state data in for delta checks
570+
--max-stale=MAX_STALE
571+
Age of status file to make new checks (seconds)
572+
573+
=head1 COPYRIGHT, LICENSE, AND WARRANTY
574+
575+
This program is copyright 2014 Percona LLC and/or its affiliates.
576+
Feedback and improvements are welcome.
577+
578+
THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
579+
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
580+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
581+
582+
This program is free software; you can redistribute it and/or modify it under
583+
the terms of the GNU General Public License as published by the Free Software
584+
Foundation, version 2. You should have received a copy of the GNU General
585+
Public License along with this program; if not, write to the Free Software
586+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
587+
588+
=head1 VERSION
589+
590+
$PROJECT_NAME$ pmp-check-mongo.py $VERSION$
591+
592+
=cut
593+
594+
"""

0 commit comments

Comments
 (0)