1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2024-12-01 15:24:16 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
Jean Paul Galea
88707ec442 Fix.
- add newline for munin error message.
2015-09-09 09:55:21 +02:00
Jean Paul Galea
1e4da5dac6 Rewrite ykval-munin-vallatency plugin.
- avoid having to use the same internal and label name,
	as it's problematic.

- internal name has a lot of restrictions:
	s/^[^A-Za-z_]/_/
	s/[^A-Za-z0-9_]/_/g

- which doesn't allow us to show proper label names,
	the names that users will see.

- label displays :80 or :443 depending on scheme.

- avoid ugliness with shortname() and instead use endpoints().
2015-09-08 16:41:15 +02:00
Jean Paul Galea
b8e98e6049 Add shortname failure checks for munin plugins. 2015-09-08 14:47:34 +02:00
Jean Paul Galea
21b795b852 Rename function 2015-09-08 14:42:11 +02:00
Jean Paul Galea
d6d4e3e58a Use single quotes where possible. 2015-09-08 14:39:49 +02:00
Jean Paul Galea
adf9a7f833 Use echo in all munin php plugins. 2015-09-08 14:34:55 +02:00
Jean Paul Galea
cf40fec026 Modify ykval-munin-vallatency plugin.
- don't auto configure if running a single node cluster.
	(i.e. no other servers to sync to).
2015-09-08 14:19:50 +02:00
Jean Paul Galea
f2604e751a Modify ykval-munin-vallatency plugin.
- use hostname (+ port if any) for graph name.

	i.e. if we have a sync URL:
		https://api.yubico.com:8080/wsapi/2.0/sync

	instead of having "api" as name,
		we have "api.yubico.com:8080".

- also avoid using regex and use parse_url() from php core instead.
2015-09-08 14:18:41 +02:00
Jean Paul Galea
80475b2d7e Cosmetic. 2015-09-08 12:44:46 +02:00
Jean Paul Galea
4e49b4b7af Use bracket guards for substitution. 2015-09-08 12:41:18 +02:00
Jean Paul Galea
58ba93d35f Drop half baked functionality in ykval-munin-vallatency.
- plugin assumed URL uses a hostname (no static ips)
	and that hostname resolves to both ipv4 and ipv6.

- if we want to differentiate stats between ipv4 and ipv6,
	we need to re-think this and do it in a smart way.

- for now we prefer to allow cURL to pick whatever IP it resolves,
	and run the latency test on that.

- signed off by Klas Lindfors.
2015-09-08 12:32:27 +02:00
Jean Paul Galea
2272f33659 Refactor include paths.
- use PATH_SEPARATOR everywhere,
	instead of a mix of PATH_SEPARATOR and hard coded colons.

- always include /usr/share/yubikey-val first,
	then /etc/yubico/val.

- should not have any visible affects,
	since no file names are common between the two directories.

- use array+implode to make it easier to add/remove paths,
	and to avoid hardcoded the path separator.
2015-09-08 10:57:26 +02:00
Jean Paul Galea
99613cd5f4 Move function into ykval-common.php 2015-09-08 09:17:34 +02:00
Jean Paul Galea
71442e7fd6 Refactor.
- don't depend on external binaries,
	it assumes too much and is dangerous.

- we can depend on libcurl instead,
	since it's already a dependency in core.

- we should do this for other plugins too,
	and move the new function into ykval-common.php

- plugin reports same exact values as before.
2015-09-07 18:01:04 +02:00
Jean Paul Galea
ed6fb6cbb3 Cosmetic changes.
- refactor whitespace for munin plugins written in php.

- change spaces into tabs and fix brackets mostly.
2015-09-07 16:20:58 +02:00
Jean Paul Galea
b417759932 Update copyright year. 2015-07-20 20:01:16 +00:00
Jean Paul Galea
e76c5002f2 Drop php closing tags. 2015-07-15 15:14:25 +02:00
Dain Nilsson
ee1f040b00 Updated copyright headers. 2013-02-04 17:39:36 +01:00
Dain Nilsson
976146a646 Use yubikey-val instead of ykval in paths, configuration in /etc/yubico/val 2013-01-28 13:12:46 +01:00
Klas Lindfors
ee36db3be1 newer munin uses variables in the plugin instead of the filename to determine graph name, make them consistent. 2012-08-21 08:23:43 +02:00
Fredrik Thulin
2c9b57a0a0 Detect timeouts and errors in curl (such as resolver failures). 2012-05-22 12:15:31 +02:00
Simon Josefsson
3aaf776220 Add. 2010-11-15 10:32:32 +00:00