Home Directory Plugins Software SVN Remote Commit Statistics

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

SVN Remote Commit Statistics

Rating
0 votes
Favoured:
0
Current Version
1
Last Release Date
2013-05-22
Compatible With
  • Nagios 3.x
  • Nagios XI
Owner
License
GPL
Hits
38069
Files:
FileDescription
svn_stats.shsvn_stats.sh
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
A small and simple shell script for checking number of svn commits to a remote repository by parsing the commit log.
A small and simple shell script for checking number of svn commits to a remote repository by parsing the commit log. Supports checking by the committer name or checking commits to the entire repository. You can check for commits by day, month, or total.

Requires svn installed on the nagios server. You may have to run the script once from the cli as user "nagios" in order to accept the cert if you are checking a secure repository.

Output of help (-h):
-----------------------------------------------------------
[root@nagiosxi libexec]# ./svn_stats.sh -h
Simple svn statistics

Usage:
svn_stats.sh -s [server/repo] -u [username] -p [password] -m [mode] (-c) [committer]

Options:
-s
SVN Server Repository to connect to: eg. https://dev.sweetcode.com/svn/cool_project
-u
SVN username for connection
-p
Password for SVN username
-c
The committing username from which to gather statistics
(Only used for user-* modes)
-h
Help menu (this)

Modes:
user-commits-total
Total number of commits for committer

user-commits-monthly
Total number of commits this month for committer

user-commits-daily
Total number of commits today for committer

total-commits
Total number of commits to the repository
(do not use -c with this mode)

total-commits-monthly
Total number of monthly commits to the repository
(do not use -c with this mode)

total-commits-daily
Total number of daily commits to the repository
(do not use -c with this mode)

Notes:
SVN MUST BE INSTALLED AS THIS PLUGIN USES THE COMMAND: 'svn log'

If the repository uses ssl/certs, you may need to connect
to the repo from the cli as your monitoring user (nagios)
in order to accept the cert permanently. Otherwise the
check will die and report '0 commits'. Also, if your
password contains nasty meta chars, you will need to make
use of the resources.cfg (nagios) file, this is considered
best practice anyways.