Commit Graph

26 Commits

Author SHA1 Message Date
Dominik Csapak
27bc5e8e02 status/plugin: extend with add/update/delete hooks
like we do in it for the storage section configs

we will need this to store the token for influxdbs http api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 17:32:23 +01:00
Dominik Csapak
fa97819773 status/plugin: extend send/_connect/_disconnect/test_connection
by providing the id or cfg to have better context in those methods
we will need that for influxdb http api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-28 17:32:23 +01:00
Dominik Csapak
5a7252df23 status/plugin: do not test connection if disabled
so that if one disables the plugin (e.g. because it is offline),
it will work even when the server is not reachable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-12-07 17:20:54 +01:00
Dominik Csapak
dadba141a8 api: metrics/server: test connection on add/update
just a basic check, but better than not checking at all

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-25 14:55:25 +01:00
Dominik Csapak
b22cbac9bf api: metrics/server: add minimum and maximum to port schema
we just added the api, so it would be good to only accept valid ports
(they were wrapped before)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-25 12:31:42 +01:00
Dominik Csapak
2f6cc103e0 Status/Plugin: add id to schema
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-20 14:00:16 +01:00
Dominik Csapak
fbe4599246 Status/Plugin: fix jsonschema for MTU
jsonschema wants 'minimum' not 'min'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-20 14:00:16 +01:00
Thomas Lamprecht
acff3d6eec follouwp whitespace fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-29 09:12:22 +01:00
Fabian Grünbichler
0fc553eb1b status/metrics: make MTU configurable
since some users don't even have a full 1500 (and some systems might
have links with bigger MTU and not require as much fragmentation).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-10-29 08:51:51 +01:00
Thomas Lamprecht
fab600b796 fix #2802: metric flush check should not care about current usage
We only need to check if the next data addition brings us over the
batch send size, not if we have already at least half of that data in
there, as else we may get again over the batch sent size.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-17 10:16:27 +02:00
Thomas Lamprecht
1d5c5ba19a acme: account: hide TOS checkbox during load and reuse field references
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-14 16:28:39 +02:00
Thomas Lamprecht
45dbb18177 ext. metric server: workaround stupid MTU problem..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-08 17:22:35 +02:00
Thomas Lamprecht
5c77a34f08 metric server: improve flush on big data updates
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-08 17:15:44 +02:00
Thomas Lamprecht
87be2c19e3 ext. metric: move to a transaction model
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-18 19:04:29 +01:00
Thomas Lamprecht
f1f4bfefc7 move common metric server management part to own module
For now it only handles the plugin registration and the two recently
integrated helpers.
But, this is a prepartation to move the external metrics server
update mechanic from a stateless always-newly-connect-send-disconnect
to a statefull transaction based mechanis; see later patches

keep the PVE::Status::Plugin use in pvestatd, as we read the cfs
hosted status.cfg there, and the parser is defined by the common
status plugin base module.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-16 16:19:42 +01:00
Thomas Lamprecht
e051836377 status: cleanup config parser regsistration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-15 10:49:05 +01:00
Thomas Lamprecht
68f58b5d59 status plugins: add _connect to plugin method interface
in preparation of doing real transactions, with one batch connect +
send + disconnect, and not hundreds of those per update cycle..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-14 19:27:28 +01:00
Thomas Lamprecht
5e82aaac89 status plugins: add update_all and foreach_plug helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-14 19:24:24 +01:00
Thomas Lamprecht
fa6f371649 cleanup Status plugins use statements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-11 09:22:04 +02:00
Thomas Lamprecht
0bd2dc09e4 followup: code cleanup, remove unnecessary type check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-11 09:11:07 +02:00
Dominik Csapak
035452b97f fix #1326: allow multiple status server definitions per type
we allow an id like storage.cfg but leave it optional (so we do not
break existing configs):

 influxdb: name

so that one can export the data to multiple servers of the same type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-11 08:11:43 +02:00
Thomas Lamprecht
09f19204be InfluxDB plugins: send nodename when updating CT/VM status
This allows filtering by node in InfluxDB queries, so the statistics
of all virtual guests on a specific nodes can be queried.

While for InfluxDB this is only a tag which does changes where the
data is stored, Graphite - our other status plugin - has no such
mechanics available. If we would add it to the object hierarchy,
e.g.: "qemu.$vmid.$nodename" a migration of a VM would result in two
different datasets.
So avoid breaking setups and omit it for Graphite for now.

Suggested-by: Daniel1108 <danielgallegosanchez@gmail.com>
CC: Daniel1108 <danielgallegosanchez@gmail.com>

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-02-28 11:28:10 +01:00
Thomas Lamprecht
4caf47e9e2 Status: allow IPs and move properties to base class
We only allowed servers with the dns-name format, as such status
server may often be in internal networks and with no hostname
(testing, small network so no dns, ...) do not limit the
configuration possibilities with no reason.

Also move the base property part to the base Status class, all
current plugins use server and port so no need for double
declaration of format/descriptions.

If a future plugin doesn't need them it can omit them by not
returning the respective properties in the options method
inherited by SectionConfig.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-05-23 09:16:33 +02:00
Thomas Lamprecht
9ed623a6d8 Status/Plugin: fix Typo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-05-04 11:08:59 +02:00
Alexandre Derumier
567bb543a7 add graphite plugin V2
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-06-23 17:13:14 +02:00
Dietmar Maurer
eb32152f91 implement status plugin framework 2015-06-22 09:45:57 +02:00