git-notify: Polish up the "tag notifications"
Use better labels for the tag ref and the SHA1 name of the tag object.
Use better labels for the tag ref and the SHA1 name of the tag object.
git-notify: Distinguish between tag types
Distinguish between annotated tags and lightweight tags. In the former
case, send an annotated "tag notification", in the latter case, send a
"ref change notification" (as we did in both cases before).
Distinguish between annotated tags and lightweight tags. In the former
case, send an annotated "tag notification", in the latter case, send a
"ref change notification" (as we did in both cases before).
git-notify: Fix "global" notifications
If the number of commits included with a single push exceeds the maximum
specified via "-n", a single notification will be generated instead of
individual e-mails. For listing the commits within such a notification,
git-rev-list(1)'s "--pretty" option is used. This yields output which
the git_rev_list() subroutine didn't accept. That's now fixed.
If the number of commits included with a single push exceeds the maximum
specified via "-n", a single notification will be generated instead of
individual e-mails. For listing the commits within such a notification,
git-rev-list(1)'s "--pretty" option is used. This yields output which
the git_rev_list() subroutine didn't accept. That's now fixed.
git-notify: Optionally [tag] the subject
If the new "-T" option is specified or "notify.emitRepository" is set,
the subject of e-mail notifications will be prefixed with [<tag>], where
<tag> is the name of the updated repository.
If the new "-T" option is specified or "notify.emitRepository" is set,
the subject of e-mail notifications will be prefixed with [<tag>], where
<tag> is the name of the updated repository.
git-notify: Optionally omit the author name
If the new "-A" option is specified (or "notify.omitAuthor" is set), the
author name will be omitted from the subject of e-mail notifications.
If the new "-A" option is specified (or "notify.omitAuthor" is set), the
author name will be omitted from the subject of e-mail notifications.
git-notify: Make abbreviating Gitweb URLs optional
The SHA1 object name part of Gitweb URLs is now only shortened if the
user requested this by specifying the new "-z" option (or by setting
"notify.shortURLs").
While at it, also shorten the additional URL which references a diff in
e-mail notifications which don't include that diff inline because its
size exceeds the maximum number of bytes specified via "-s".
Note that while the abbreviated SHA1 object names will be unique at push
time, this cannot be guaranteed for the future, so the shortened URLs
might break some day.
The SHA1 object name part of Gitweb URLs is now only shortened if the
user requested this by specifying the new "-z" option (or by setting
"notify.shortURLs").
While at it, also shorten the additional URL which references a diff in
e-mail notifications which don't include that diff inline because its
size exceeds the maximum number of bytes specified via "-s".
Note that while the abbreviated SHA1 object names will be unique at push
time, this cannot be guaranteed for the future, so the shortened URLs
might break some day.
git-notify: Make showing the committer optional
Only the author's name and address will now be mentioned in a commit
notification by default. However, if the "-C" option is specified (or
"notify.showCommitter" is set), the committer's name and address will
also be included in the notification if the committer is not the author
of the commit (as we previously did by default).
Only the author's name and address will now be mentioned in a commit
notification by default. However, if the "-C" option is specified (or
"notify.showCommitter" is set), the committer's name and address will
also be included in the notification if the committer is not the author
of the commit (as we previously did by default).
git-notify: Make using a state file optional
Making use of a state file in order to prevent duplicate notifications
is now optional. The user must explicitly specify a file path via the
"-t" option or by setting the git-config(1) variable "notify.statefile"
to activate this functionality.
Making use of a state file in order to prevent duplicate notifications
is now optional. The user must explicitly specify a file path via the
"-t" option or by setting the git-config(1) variable "notify.statefile"
to activate this functionality.
git-notify: Don't abort if mail(1) exits non-zero
As nothing in git-notify depends on the success of the mail(1) call,
don't abort if it fails, just spit out a warning.
As nothing in git-notify depends on the success of the mail(1) call,
don't abort if it fails, just spit out a warning.
git-notify: Drop the $sent_notices variable
Now that we don't ignore empty commits anymore, there's no need to keep
track of the number of commits actually notified about, as that will
always be equal to the number of commits returned by get_new_commits().
Now that we don't ignore empty commits anymore, there's no need to keep
track of the number of commits actually notified about, as that will
always be equal to the number of commits returned by get_new_commits().
Revert "git-notify: Ignore `empty' commits"
This reverts commit db63fbfa036f5cd757aedf4547fef9e195a8c285, as it is
no longer needed and we'd like to keep the diff against the git-notify
version maintained by the Wine people as small as possible. The purpose
of db63fbfa was to suppress notifications on empty merge commits, which
can now be requested directly by specifying git-notify's "-X" option.
(Our change was implemented before the "-X" option was available, even
though the Git history suggests otherwise.)
Conflicts:
tools/git-notify
This reverts commit db63fbfa036f5cd757aedf4547fef9e195a8c285, as it is
no longer needed and we'd like to keep the diff against the git-notify
version maintained by the Wine people as small as possible. The purpose
of db63fbfa was to suppress notifications on empty merge commits, which
can now be requested directly by specifying git-notify's "-X" option.
(Our change was implemented before the "-X" option was available, even
though the Git history suggests otherwise.)
Conflicts:
tools/git-notify
Revert "git-notify: Remove unused [...] code"
This reverts commit 5445b9769f254781e482062bacc6603a5cd63059. Alexandre
Julliard pointed out that the code in question was used if git-notify
was explicitly called with the SHA1 name of an annotated tag object. At
the moment, the code in question actually _is_ unused due to later
modifications, but it wasn't at the time 5445b976 was committed, and
we'll add further changes so that the code will be used again in the
future.
Conflicts:
tools/git-notify
This reverts commit 5445b9769f254781e482062bacc6603a5cd63059. Alexandre
Julliard pointed out that the code in question was used if git-notify
was explicitly called with the SHA1 name of an annotated tag object. At
the moment, the code in question actually _is_ unused due to later
modifications, but it wasn't at the time 5445b976 was committed, and
we'll add further changes so that the code will be used again in the
future.
Conflicts:
tools/git-notify
git-notify: Minor cosmetic changes
Fix the description of the "-U" option.
Fix the description of the "-U" option.
Allow rsyncing to local paths
Add snapshots upload scripts
git-notify: Make the state file group writable
For shared repositories, the state file used by git-notify should
usually be group writable, so we now set the umask to 0002 by default.
This can be adjusted by setting the "notify.umask" configuration key or
by using the "-U" option on the command line.
For shared repositories, the state file used by git-notify should
usually be group writable, so we now set the umask to 0002 by default.
This can be adjusted by setting the "notify.umask" configuration key or
by using the "-U" option on the command line.
git-notify: Remove an empty subroutine
The gitweb_url() subroutine was an unused and empty hangover.
The gitweb_url() subroutine was an unused and empty hangover.
git-update-mirror: Remove a useless sed(1) call
The sed(1) command in question was a hangover which had no effect
anymore.
The sed(1) command in question was a hangover which had no effect
anymore.
git-notify: Check the exit status of pipes
Properly check the exit status of all processes we execute and abort on
error.
Properly check the exit status of all processes we execute and abort on
error.
git-notify: Handle non-UTF-8 commits
Make sure that commit messages which use an encoding other than US-ASCII
or UTF-8 are handled correctly. Also, assume that the diff contents use
the same encoding as the commit message. This assumption may well be
wrong, but that's the best we can do.
Make sure that commit messages which use an encoding other than US-ASCII
or UTF-8 are handled correctly. Also, assume that the diff contents use
the same encoding as the commit message. This assumption may well be
wrong, but that's the best we can do.
git-notify: Don't generate duplicate notifications
Never notify on a given commit more than once, even if it's referenced
via multiple branch heads. We make sure this won't happen simply by
maintaining a list of commits we notified about. The file path used for
saving this list can be specified using the new "-t" option. (The
contrib/hooks/post-receive-email script distributed with Git tries hard
to avoid such a list, but it doesn't get the necessary magic right.)
Never notify on a given commit more than once, even if it's referenced
via multiple branch heads. We make sure this won't happen simply by
maintaining a list of commits we notified about. The file path used for
saving this list can be specified using the new "-t" option. (The
contrib/hooks/post-receive-email script distributed with Git tries hard
to avoid such a list, but it doesn't get the necessary magic right.)
git-nofity: Try to shorten Gitweb URLs
Instead of using the full SHA1 values of commit object names within
Gitweb URLs, try to abbreviate them to a shorter unique name.
Instead of using the full SHA1 values of commit object names within
Gitweb URLs, try to abbreviate them to a shorter unique name.
git-notify: Move the Gitweb URL to the bottom
In commit notifications, specify the Gitweb URL (if any) at the bottom
of the ASCII "table" which summarizes the commit. That looks better.
In commit notifications, specify the Gitweb URL (if any) at the bottom
of the ASCII "table" which summarizes the commit. That looks better.
git-notify: Truncate summary after 50 characters
If the first line of a commit message is longer than 50 characters,
truncate it before adding the resulting string to the subject line of a
notification. This makes sure the subject line won't get too long
(unless the commit author name is unusually long, which we don't check).
The Git User's Manual recommends keeping the first line of a commit
message shorter than that, anyway:
| Though not required, it's a good idea to begin the commit message with
| a single short (less than 50 character) line summarizing the change,
| followed by a blank line and then a more thorough description. Tools
| that turn commits into email, for example, use the first line on the
| Subject line and the rest of the commit in the body.
[ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html ]
If the first line of a commit message is longer than 50 characters,
truncate it before adding the resulting string to the subject line of a
notification. This makes sure the subject line won't get too long
(unless the commit author name is unusually long, which we don't check).
The Git User's Manual recommends keeping the first line of a commit
message shorter than that, anyway:
| Though not required, it's a good idea to begin the commit message with
| a single short (less than 50 character) line summarizing the change,
| followed by a blank line and then a more thorough description. Tools
| that turn commits into email, for example, use the first line on the
| Subject line and the rest of the commit in the body.
[ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html ]
git-notify: Send notifications on ref changes, too
Do not only generate notifications on commits, but also if a branch head
or lightweight tag was created, removed, or modified. Notifications on
branch head updates are omitted if one or more commit notification have
been generated and the branch head now references a descendant of the
originally referenced commit (which should be the usual case).
Do not only generate notifications on commits, but also if a branch head
or lightweight tag was created, removed, or modified. Notifications on
branch head updates are omitted if one or more commit notification have
been generated and the branch head now references a descendant of the
originally referenced commit (which should be the usual case).
git-notify: Call git-rev-list(1) via a subroutine
Add a subroutine which abstracts away executing git-rev-list(1) and
checking the result in order to avoid code duplication.
Add a subroutine which abstracts away executing git-rev-list(1) and
checking the result in order to avoid code duplication.
git-notify: Mention the committer where applicable
If the committer is not the author of the commit, mention the committer
in addition to the author.
If the committer is not the author of the commit, mention the committer
in addition to the author.
git-notify: New subroutine for column alignment
Most notifications include an ASCII "table" with two columns. The
formatting of these columns is now handled by the new format_table()
subroutine, so that the alignment can easily be changed in the future.
Most notifications include an ASCII "table" with two columns. The
formatting of these columns is now handled by the new format_table()
subroutine, so that the alignment can easily be changed in the future.
git-notify: Ignore "empty" commits
Omit notifications regarding commits which don't change the tree
whatsoever.
Omit notifications regarding commits which don't change the tree
whatsoever.
git-notify: Remove unused tag notification code
The code which handles notifications regarding tags was unused, as only
objects listed by git-rev-list(1) are considered, and git-rev-list(1)
never spits out the sha1 of a tag object.
The code which handles notifications regarding tags was unused, as only
objects listed by git-rev-list(1) are considered, and git-rev-list(1)
never spits out the sha1 of a tag object.
git-notify: Save author without trailing space
Adjust the regular expression which catches the commit author name so
that it doesn't include the space character which follows that name.
Adjust the regular expression which catches the commit author name so
that it doesn't include the space character which follows that name.
Import git-update-mirror and git-notify
Import the (self-written) git-update-mirror script, which updates clones
of Git repositories and then calls git-notify (in just the same way as a
post-receive hook would be called by Git). The git-notify script is
imported from git://source.winehq.org/git/tools.git (commit: 03d66f34)
and generates notifications on repository changes. We'll use these
scripts for generating our commit e-mails.
Import the (self-written) git-update-mirror script, which updates clones
of Git repositories and then calls git-notify (in just the same way as a
post-receive hook would be called by Git). The git-notify script is
imported from git://source.winehq.org/git/tools.git (commit: 03d66f34)
and generates notifications on repository changes. We'll use these
scripts for generating our commit e-mails.
Fix usage of repeated -o options in check_snmp
Set proper network byte order for icmp_id and icmp_seq in icmp packets
Increment per-host sequence in check_icmp
Change default for SFSNAP_DEST
Correcting name and email address
Enhancements to tools/sfsnapshotgit
Using $srcdir is the proper way to go
Add sfsnapshotgit
Allow custom versions with the release file...
Updated documentation re: no equals sign and single quote
Updated NEWS file with docs changes
Test, again
Test
Oops - wrong author/bug in last commit!
Fix check_ircd binding to wrong interface (#668778)
Update RELEASING document with proper tag creation and push commands
Prep for 1.4.14 release
Ensure dirhandle is closed (Duncan Ferguson)
Fix skip number
Add a test that succeeds on check_snmp v1.4.13. Newer versions skip additional
lines so this new test fails on the current head.
Note: check_snmp v1.4.13 with multi-line strings return somewhat v3 output;
it's not exactly what the specs say but it doesn't appears to break them
either. The fix could eventually supports both v2 and v3 output formats.
lines so this new test fails on the current head.
Note: check_snmp v1.4.13 with multi-line strings return somewhat v3 output;
it's not exactly what the specs say but it doesn't appears to break them
either. The fix could eventually supports both v2 and v3 output formats.
Fix check_snmp passing single-quotes as -m argument when it should be empty
check_snmp: Add some verbose output and tests
Add tests using custom snmp agent
Only multi-line string test for now (regression test), counter rollover
tests planed with my snmp_counters_new branch.
NB: 64bit counters are broken in NetSNMP::agent from NetSNMP version 5.4.1
and lower, but might come in handy one day
Only multi-line string test for now (regression test), counter rollover
tests planed with my snmp_counters_new branch.
NB: 64bit counters are broken in NetSNMP::agent from NetSNMP version 5.4.1
and lower, but might come in handy one day
Fix check_snmp Timetick test with <1 day uptime
Add accidentally removed line plus a note about the web copy
Merge changes from web
Updated links for exchange.nagios.org
pst3 compile with Sun Studio Compiler
Added example for check_cluster to alert if more than X non-OK states
Switch back to "use Test" and plain prints instead of diag()
Tinderbox output testing commit
Make output of "make test" more verbose
This is intended to make error fixing based on tinderbox output
easier.
This is intended to make error fixing based on tinderbox output
easier.
Fixed error in rtt/rta calculation in case of system clock problems
Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more.
The RTA calculation hopefully gets a more accurate value in these cases also.
Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more.
The RTA calculation hopefully gets a more accurate value in these cases also.
Fixed testcases for check_snmp, check_ifstatus and check_ifoperstatus when no snmp community is specified
The checks for invalid/unavailable hosts need a complete command line.
They failed on hosts where no community was specified. Now, an invalid community is used so
the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway.
The checks for invalid/unavailable hosts need a complete command line.
They failed on hosts where no community was specified. Now, an invalid community is used so
the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway.
15 years agoFurther test parameters and skip blocks for check_ifoperstatus.t. getTestparam change...
Further test parameters and skip blocks for check_ifoperstatus.t. getTestparam changes for check_ifstatus.t and ifoperstatus.t
Added snmp_interface and snmp_ifxtable test parameters to check_ifoperstatus.t.
Also getTestParameter calls for both plugins were converted to use three arguments
instead of undocumented >3 arg behaviour which led to redundant data in NPTest.cache.
Added snmp_interface and snmp_ifxtable test parameters to check_ifoperstatus.t.
Also getTestParameter calls for both plugins were converted to use three arguments
instead of undocumented >3 arg behaviour which led to redundant data in NPTest.cache.
Merge branch 'master' of ssh://PsychoTrahe@repo.or.cz/srv/git/nagiosplugins
renamed check_ifoperstatus' newly introdced -x to -P so it fits check_ifstatus
check_ifstatus already used -x so both plugins can use same short option, now.
to specify privacy protocol.
check_ifstatus already used -x so both plugins can use same short option, now.
to specify privacy protocol.
Fixed SNMPv3 behaviour of check_ifstatus. Added -P to define privprotocol (#2343438 - Robin Schroeder)
check_ifstatus didn't function correctly with SNMPv3. This is fixed now.
Created argument-hash for SNMP session creation. This removes redundant code.
Session creation was moved out of process_arguments() and now takes place
after setting the timeout handler.
Additionally the -P argument was added to specify the privprotocol.
check_ifstatus didn't function correctly with SNMPv3. This is fixed now.
Created argument-hash for SNMP session creation. This removes redundant code.
Session creation was moved out of process_arguments() and now takes place
after setting the timeout handler.
Additionally the -P argument was added to specify the privprotocol.
Added testcases for check_ifoperstatus
Added testcases for check_ifoperstatus. No SNMPv3 testing
included for now.
Added testcases for check_ifoperstatus. No SNMPv3 testing
included for now.
minor fixes to check_ifoperstatus
Minor output fixes for check_ifoperstatus.
Fixed typo so that -n now implies -I as documented.
Minor output fixes for check_ifoperstatus.
Fixed typo so that -n now implies -I as documented.
Use a more "natural" way of writing argument lists in extra-opts tests.
check_ifoperstatus is now more user friendly in case of missing arguments
Added proper usage messages in case of missing arguments.
Removed accidently committed Data::Dumper call.
Minor whitespace fixes.
Added proper usage messages in case of missing arguments.
Removed accidently committed Data::Dumper call.
Minor whitespace fixes.
Whitespace and indent fixes for check_ifoperstatus
15 years agoFixed SNMPv3 behaviour of check_ifoperstatus. Added -x to define privprotocol (#23434...
Fixed SNMPv3 behaviour of check_ifoperstatus. Added -x to define privprotocol (#2343438 - Robin Schroeder)
check_ifoperstatus didn't function correctly with SNMPv3. This is fixed now.
Created argument-hash for SNMP session creation. This removes redundant code.
Session creation was moved out of process_arguments() and now takes place
after setting the timeout handler.
Additionally the -x argument was added to specify the privprotocol.
check_ifoperstatus didn't function correctly with SNMPv3. This is fixed now.
Created argument-hash for SNMP session creation. This removes redundant code.
Session creation was moved out of process_arguments() and now takes place
after setting the timeout handler.
Additionally the -x argument was added to specify the privprotocol.
Fix the memory allocation for the thresholds data
Allocate the appropriate amount of memory for storing the thresholds
data. Before, we allocated the amount of memory required for storing a
_pointer_ to the thresholds data. This crashed (at least) check_mysql
when using its "-S" option on FreeBSD/amd64 (as reported and analyzed by
Nikita Kalabukhov - 2797757).
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Allocate the appropriate amount of memory for storing the thresholds
data. Before, we allocated the amount of memory required for storing a
_pointer_ to the thresholds data. This crashed (at least) check_mysql
when using its "-S" option on FreeBSD/amd64 (as reported and analyzed by
Nikita Kalabukhov - 2797757).
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Don't use the plain char type for data buffers
Buffers which are used for holding arbitrary data should be referenced
using pointers to void and accessed using pointers to unsigned char.
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Buffers which are used for holding arbitrary data should be referenced
using pointers to void and accessed using pointers to unsigned char.
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Whitespace indent fixes for check_pgsql
Fixed check_icmp compiler warnings by including float.h
Self defined DBL_MAX caused compiler warnings. Now float.h
which defines DBL_MAX is included.
Self defined DBL_MAX caused compiler warnings. Now float.h
which defines DBL_MAX is included.
Fixed --help output for warn and critical thresholds (sf.net #2796624, debian #530553)
check_icmp wrongly calculated the current thresholds in --help output.
check_icmp wrongly calculated the current thresholds in --help output.
Added verbose output to check_pgsql (#2799281 - Jun Kuriyama)
check_pgsql displayed the -v flag in help output, but didn't
accept the verbosity argument. Added -v and basic verbose output.
check_pgsql displayed the -v flag in help output, but didn't
accept the verbosity argument. Added -v and basic verbose output.
check_fping now supports passing target timeout and interval to fping (#2347686 - Martin Foster)
Added support for passing timeout and interval length to check_fping.
To protect compatibility, both options use fping's defaults if they
are not specified on the command line.
Added support for passing timeout and interval length to check_fping.
To protect compatibility, both options use fping's defaults if they
are not specified on the command line.
check_snmp: Make use of standard threshold functions
This patch makes use of standard threshold functions. This allows using
doubles as thresholds.
Since SNMP supports only integers, double precision numbers are only
printed when parsed from a STRING type.
In addition, support for printing properly Timeticks type has been added,
and the code has been thoroughly cleaned.
This patch makes use of standard threshold functions. This allows using
doubles as thresholds.
Since SNMP supports only integers, double precision numbers are only
printed when parsed from a STRING type.
In addition, support for printing properly Timeticks type has been added,
and the code has been thoroughly cleaned.
Fix whitespaces in check_snmp
Fixed wrong perfdata label for output traffic in check_mrtgtraf
check_mrtgtraf used the label "in" for both input and output traffic.
This fixed, now.
check_mrtgtraf used the label "in" for both input and output traffic.
This fixed, now.
Removed -n option in check_smtp's help and usage output (#2782784)
Check_smtp's help showed the -n/--nocommand options to not send an
SMTP command. This usage is covered by check_tcp and is thus not needed
in check_smtp.
Check_smtp's help showed the -n/--nocommand options to not send an
SMTP command. This usage is covered by check_tcp and is thus not needed
in check_smtp.
Whitespace changes only
Fix a few minor typos
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Talk about Git instead of CVS
Update the Developer Guidelines to reflect the fact that our development
is done using Git instead of CVS these days (as noted by Chris Pepper on
the "nagiosplug-devel" list).
While at it, apply another few minor cleanups.
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Update the Developer Guidelines to reflect the fact that our development
is done using Git instead of CVS these days (as noted by Chris Pepper on
the "nagiosplug-devel" list).
While at it, apply another few minor cleanups.
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Remove comments regarding former requirements
Don't explain why Libtool and Gettext are no longer needed. Libtool
actually is a requirement, as (at least) the M4 macros provided by
Libtool are needed for our Autotools setup. And the fact that Gettext
is no longer needed probably isn't that interesting for new developers.
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Don't explain why Libtool and Gettext are no longer needed. Libtool
actually is a requirement, as (at least) the M4 macros provided by
Libtool are needed for our Autotools setup. And the fact that Gettext
is no longer needed probably isn't that interesting for new developers.
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Fixed typo in check_disk
15 years agoFixed crash from check_nt when -H unspecified or given multiple times (sf.net #273175...
Fixed crash from check_nt when -H unspecified or given multiple times (sf.net #2731755, debian #521097)