1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-26 21:54:16 +01:00

Added link to upgrade.yubico.com

This commit is contained in:
Dain Nilsson 2015-01-09 13:28:47 +01:00 committed by Klas Lindfors
parent 3f8aacde98
commit 547fc17d8d
4 changed files with 122 additions and 3 deletions

View File

@ -38,10 +38,11 @@ CODE = COPYING Makefile NEWS README ykval-checksum-clients \
MANS = ykval-queue.1 ykval-import.1 ykval-export.1 \ MANS = ykval-queue.1 ykval-import.1 ykval-export.1 \
ykval-import-clients.1 ykval-export-clients.1 \ ykval-import-clients.1 ykval-export-clients.1 \
ykval-checksum-clients.1 ykval-checksum-deactivated.1 \ ykval-checksum-clients.1 ykval-checksum-deactivated.1 \
ykval-synchronize.1 ykval-gen-clients.1 ykval-synchronize.1 ykval-gen-clients.1 ykval-nagios-queuelength.1
MUNIN = ykval-munin-ksmlatency.php ykval-munin-vallatency.php \ MUNIN = ykval-munin-ksmlatency.php ykval-munin-vallatency.php \
ykval-munin-queuelength.php ykval-munin-responses.pl \ ykval-munin-queuelength.php ykval-munin-responses.pl \
ykval-munin-yubikeystats.php ykval-munin-ksmresponses.pl ykval-munin-yubikeystats.php ykval-munin-ksmresponses.pl
NAGIOS= ykval-nagios-queuelength.php
DOCS = doc/Generating_Clients.adoc doc/Getting_Started_Writing_Clients.adoc \ DOCS = doc/Generating_Clients.adoc doc/Getting_Started_Writing_Clients.adoc \
doc/Import_Export_Data.adoc doc/Installation.adoc doc/Make_Release.adoc \ doc/Import_Export_Data.adoc doc/Installation.adoc doc/Make_Release.adoc \
doc/Munin_Probes.adoc doc/Revocation_Service.adoc \ doc/Munin_Probes.adoc doc/Revocation_Service.adoc \
@ -83,6 +84,7 @@ install:
install -D ykval-import-clients $(DESTDIR)$(sbinprefix)/ykval-import-clients install -D ykval-import-clients $(DESTDIR)$(sbinprefix)/ykval-import-clients
install -D ykval-checksum-clients $(DESTDIR)$(sbinprefix)/ykval-checksum-clients install -D ykval-checksum-clients $(DESTDIR)$(sbinprefix)/ykval-checksum-clients
install -D ykval-checksum-deactivated $(DESTDIR)$(sbinprefix)/ykval-checksum-deactivated install -D ykval-checksum-deactivated $(DESTDIR)$(sbinprefix)/ykval-checksum-deactivated
install -D ykval-nagios-queuelength.php $(DESTDIR)$(sbinprefix)/ykval-nagios-queuelength
install -D ykval-queue.1 $(DESTDIR)$(manprefix)/ykval-queue.1 install -D ykval-queue.1 $(DESTDIR)$(manprefix)/ykval-queue.1
install -D ykval-synchronize.1 $(DESTDIR)$(manprefix)/ykval-synchronize.1 install -D ykval-synchronize.1 $(DESTDIR)$(manprefix)/ykval-synchronize.1
install -D ykval-import.1 $(DESTDIR)$(manprefix)/ykval-import.1 install -D ykval-import.1 $(DESTDIR)$(manprefix)/ykval-import.1
@ -122,7 +124,7 @@ PROJECT = $(PACKAGE)
$(PACKAGE)-$(VERSION).tgz: $(FILES) $(PACKAGE)-$(VERSION).tgz: $(FILES)
mkdir $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION)/doc mkdir $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION)/doc
cp $(CODE) $(MANS) $(MUNIN) $(PACKAGE)-$(VERSION)/ cp $(CODE) $(MANS) $(MUNIN) $(NAGIOS) $(PACKAGE)-$(VERSION)/
cp $(DOCS) $(PACKAGE)-$(VERSION)/doc/ cp $(DOCS) $(PACKAGE)-$(VERSION)/doc/
git2cl > $(PACKAGE)-$(VERSION)/ChangeLog git2cl > $(PACKAGE)-$(VERSION)/ChangeLog
tar cfz $(PACKAGE)-$(VERSION).tgz $(PACKAGE)-$(VERSION) tar cfz $(PACKAGE)-$(VERSION).tgz $(PACKAGE)-$(VERSION)

View File

@ -25,7 +25,8 @@ shared key to further authenticate response signatures from Yubico.
If you for some reason do not want to rely on HTTPS. You may also sign If you for some reason do not want to rely on HTTPS. You may also sign
requests using this API key. requests using this API key.
To get an API key, first use our online API key generator. It will To get an API key, first use
https://upgrade.yubico.com/getapikey/[our online API key generator]. It will
assign you an ID and create a shared key. You can use the shared key assign you an ID and create a shared key. You can use the shared key
to authenticate that the API responses do come from Yubico. to authenticate that the API responses do come from Yubico.

View File

@ -0,0 +1,53 @@
.\" Copyright (c) 2015 Yubico AB
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are
.\" met:
.\"
.\" * Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\"
.\" * Redistributions in binary form must reproduce the above
.\" copyright notice, this list of conditions and the following
.\" disclaimer in the documentation and/or other materials provided
.\" with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" The following commands are required for all man pages.
.de URL
\\$2 \(laURL: \\$1 \(ra\\$3
..
.if \n[.g] .mso www.tmac
.TH ykval-nagios-queuelength "1" "February 2015" "yubico-val"
.SH NAME
ykval-nagios-queuelength - Check the current sync queuelength for the
yubikey-val server.
.SH SYNOPSIS
.B ykval-nagios-queuelength
.SH DESCRIPTION
Checks the length of the current yubikey-val queuelength. Made to be used
with the service nrpe and nagios.
Database configuration is read from /etc/yubico/val/ykval-config.php
.SH BUGS
Report ykval-nagios-queuelength bugs in
.URL "https://github.com/Yubico/yubikey-val/issues" "the issue tracker"
.SH "SEE ALSO"
The
.URL "https://developers.yubico.com/yubikey-val/Server_Replication_Protocol.html" "Server Replication Protocol"
.PP
YubiKeys can be obtained from
.URL "http://www.yubico.com/" "Yubico" "."

63
ykval-nagios-queuelength.php Executable file
View File

@ -0,0 +1,63 @@
#!/usr/bin/php
<?php
# Copyright (c) 2010-2014 Yubico AB
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set_include_path(get_include_path() . PATH_SEPARATOR .
"/etc/yubico/val:/usr/share/yubikey-val");
require_once 'ykval-synclib.php';
require_once 'ykval-config.php';
require_once 'ykval-log.php';
if ($argc != 3) {
print "warning and critical levels have to be given on commandline\n";
exit (3);
}
$warning = $argv[1];
$critical = $argv[2];
$sync = new SyncLib('ykval-verify:synclib');
$len = $sync->getQueueLength ();
$message = "Queue length is $len";
if($len > $critical) {
print("CRITICAL: $message\n");
exit (2);
} elseif($len > $warning) {
print("WARNING: $message\n");
exit (1);
} else {
print("OK: $message\n");
exit (0);
}
?>