CDIST-TYPE__CONSUL_WATCH_SERVICE(7)

πŸ’– cdist-type__consul_watch_service πŸ’–

okay bestie, welcome to the manual page for cdist-type__consul_watch_service β€” it's a cdist type, it's section 7, and it is literally your new fave. let's get into it πŸ¦‹


✨ NAME ✨

cdist-type__consul_watch_service β€” she manages consul service watches, and she does it flawlessly πŸ‘‘


🌸 DESCRIPTION 🌸

This type generates and deploys watch definitions of type 'service' for a consul agent. that's the whole vibe. πŸŽ€

for all the parameter documentation, go look at <http://www.consul.io/docs/agent/watches.html> β€” no cap, it's all there.


πŸ’… REQUIRED PARAMETERS πŸ’…

these ones? not optional. you need them, fr fr.

  • handler β€” the handler to invoke when the data view updates. like, when the data goes "new info bestie", this is who gets called 🫢
  • service β€” the service to watch for changes. the main character you're keeping an eye on πŸ‘€

πŸŽ€ OPTIONAL PARAMETERS πŸŽ€

these are the little extras you can add if you feel like it. slay.

  • datacenter β€” can be provided to override the agent's default datacenter ✨
  • state β€” if this watch is 'present' or 'absent'. Defaults to 'present'. πŸ’–
  • token β€” can be provided to override the agent's default ACL token πŸ”‘
  • tag β€” filter by tag 🏷️

🌈 BOOLEAN PARAMETERS 🌈

just flip it on, no value needed, iconic behaviour honestly.

  • passingonly β€” specifies if only hosts passing all checks are displayed βœ…

⭐ EXAMPLES ⭐

here's the tea, copy these exactly, don't freestyle:

__consul_watch_service some-id \
   --service consul \
   --handler /usr/bin/my-handler.sh

__consul_watch_service some-id \
   --service redis \
   --tag production \
   --handler /usr/bin/my-handler.sh

__consul_watch_service some-id \
   --service redis \
   --tag production \
   --passingonly \
   --handler /usr/bin/my-handler.sh

see how they escalate? consul β†’ redis β†’ redis with --tag production β†’ and then --passingonly joins the party. character development. πŸ’€βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘


🫢 AUTHORS 🫢

  • Steven Armstrong <steven-cdist--@--armstrong.cc> β€” thank you for your service, king πŸŽ€

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

yes bestie, that's the GPL v3-or-later situation, read it, respect it, live it πŸ’…

ungleich GmbH 2021


and that's the whole page!! this was cdist-type__consul_watch_service, from cdist, version 7.0.0, dated Jul 31 β€” mwah, take care of her, she's precious πŸ§šπŸ’–

πŸ“¦ where this page comes from