How to access the payload passed to the event/query in the handler script?

48 views
Skip to first unread message

Ramachandraiah Nikadi

unread,
Mar 20, 2018, 2:11:32 AM3/20/18
to Serf
Hi All,

I started exploring serf. I am not sure how to get the payload passed to the event or query in handler script.

Below are the serf commands where I am passing the payload "Test" to the query/event.

serf query -rpc-addr=127.0.0.1:7373  load
 Test
(or)
serf event -rpc-addr=127.0.0.1:7373  deploy Test

When I send above query or event, I can see that all the cluster members logs the info about the Payload: Test.

The payload is not passed to the handler script as I am not receiving any arguments to the script(echo $*, echo $1 printing nothing)

Can someone please help me.

Thanks in advance.
Ram

Ranjib Dey

unread,
Mar 20, 2018, 4:12:10 PM3/20/18
to ser...@googlegroups.com
If you have handler configured as script, they can read stdin (https://www.serf.io/docs/agent/event-handlers.html), if you have rpc client, you read it from the socket over msgpack 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/serf/issues
IRC: #serfdom on Freenode
---
You received this message because you are subscribed to the Google Groups "Serf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serfdom+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/serfdom/75abee48-3f6e-4325-88d3-dafb00e62bc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages