CDIST-TYPE__CONSUL_WATCH_CHECKS(7)
π CDIST-TYPE__CONSUL_WATCH_CHECKS π
okay bestie, welcome to cdist-type__consul_watch_checks, section 7 of the manual, and yes this is the one that manages consul checks watches. Sit down, hydrate, let's go. π¦
β¨ NAME β¨
cdist-type__consul_watch_checks β manages consul checks watches. that's it, that's the whole vibe. π
πΈ DESCRIPTION πΈ
So what this type does is generate and deploy watch definitions of type 'checks' for a consul agent. like, it makes them, and then it deploys them. both. iconic behaviour honestly.
and if you want the actual parameter documentation (the deep lore, the iykyk details), it lives at http://www.consul.io/docs/agent/watches.html. go read it, bestie, it's giving β¨reference materialβ¨.
π REQUIRED PARAMETERS π
not optional. no skipping. the vibe check will fail. π«Ά
handlerβ the handler to invoke when the data view updates. that's the one thing you literally cannot leave out. the moment the data view updates, this guy gets invoked. that's his whole job. π«
π OPTIONAL PARAMETERS π
here's the fun part, the little extras, the accessories to the outfit:
datacenterβ you can provide this to override the agent's default datacenter. if you don't, the agent just uses its own default, no drama. πΊοΈfilter-serviceβ filters down to a specific service. β οΈ heads up though: this Conflicts with--filter-service's sworn enemy,--filter-state. you pick one, not both. it's giving "choose your fighter". π€filter-stateβ filters down to a specific state instead. β οΈ and yeah, same deal: this Conflicts with--filter-service. one or the other, bestie. periodt. π«stateβ is this watch'present'or'absent'? that's the question. and the answer defaults to'present', because obviously we're keeping it unless you say otherwise. π«‘tokenβ you can provide this to override the agent's default ACL token. very "let me handle this myself" energy. π
π EXAMPLES π
here are the actual receipts, copy them exactly, don't freestyle:
__consul_watch_checks some-id \
--handler /usr/bin/my-handler.sh
that's the bare minimum. just a handler, living its simple life. π
__consul_watch_checks some-id \
--filter-service consul \
--handler /usr/bin/my-handler.sh
now we're filtering to the consul service. main character energy. π
__consul_watch_checks some-id \
--filter-state passing \
--handler /usr/bin/my-handler.sh
and here we're filtering to the passing state instead. not both filters though!! we discussed this!! π
π§ SEE ALSO π§
cdist-type__consul_agent(7)β go look at this one too, it's the sibling- consul documentation at: http://www.consul.io/docs/agent/watches.html β the source material, the blueprint, the whole mood board
π AUTHORS π
- Steven Armstrong
<steven-cdist--@--armstrong.cc>β the legend who made this happen π«Ά
π COPYING π
Copyright (C) 2015 Steven Armstrong. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
β COPYRIGHT β
ungleich GmbH 2021
okay that's the whole page, bestie, you ate it π β¨
this was cdist version 7.0.0, dated Jul 31, 202β¦ (the footer got a little cut off at the end there, but you get the vibe). go forth and watch those checks. πΈπ¦π
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms