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 🧚


πŸ’œ 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.


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