RIEMANN-CLIENT(1)

πŸ’– NAME πŸ’–

okay bestie, meet riemann-client β€” literally the Riemann communication tool. RIEMANN-CLIENT(1) is its page, and it lives in the riemann-c-client manual. iconic behavior from the jump πŸ’…

🌈 SYNOPSIS 🌈

riemann-client query [OPTIONS...] QUERY [HOST] [PORT]
riemann-client send [OPTIONS...] [HOST] [PORT]
riemann-client --help|-?
riemann-client --version

✨ DESCRIPTION ✨

okay so riemann-client is a very simple tool to facilitate communication with a Riemann event stream processing server. you can use it both for sending events to one, and to query it too. slay, honestly 🫢

πŸŽ€ OPTIONS πŸŽ€

in both query and send mode, HOST and PORT default to localhost and 5555, respectively. no cap ✨

πŸ¦‹ Query mode πŸ¦‹

in query mode, riemann-client takes one mandatory argument: the query itself. it must be a single argument, which will be sent to Riemann as-is, and the response dumped to the standard output β€” or, in case of an error, the error message will be written to the standard error. bestie, exact vibes only πŸ’…

see the Riemann documentation http://riemann.io/concepts.html for more information about the query syntax.

apart from the mandatory argument, riemann-client accepts the following options in query mode:

  • -j, --json β€” print the result in JSON format, instead of the default, human-readable one.
  • -T, --tcp β€” send the event via TCP (the default).
  • -G, --tls β€” send the event via TLS.
  • -o, --option option=value β€” set one client option to the given value.

available client options are:

  • cafile β€” path to the file containing trusted certificate authority certificates. only used for TLS connections.
  • certfile β€” path to the file containing the public client certificate. only used for TLS connections.
  • keyfile β€” path to the file containing the private client key. only used for TLS connections.
  • priorities β€” priorities for the cipher suites to be used for the session.

🌸 Submit mode 🌸

in submit mode, riemann-client accepts the following options:

  • -s, --state STATE β€” the state the event should describe, free-form text, optional.
  • -S, --service SERVICE β€” the service the event is coming from.
  • -h, --host HOST β€” the host the event originates from. not to be confused with the optional HOST parameter of riemann-client itself, which sets where to send the events to.
  • -D, --description DESCRIPTION β€” the description of the event, optional.
  • -t, --tag TAG β€” this option can be used multiple times to add tags to the event.
  • -a, --attribute NAME=VALUE β€” this option can be used multiple times to add custom attributes to the event.
  • -i, --metric-sint64 METRIC β€” sets the metric for the event, using integer precision.
  • -d, --metric-d METRIC β€” sets the metric of the event, using double precision.
  • -f, --metric-f METRIC β€” sets the metric of the event, using floating point precision.
  • -L, --ttl TTL β€” an optional time-to-live of the event, in seconds (floating point number).
  • -T, --tcp β€” send the event via TCP (the default).
  • -U, --udp β€” send the event via UDP.
  • -G, --tls β€” send the event via TLS.
  • -o, --option option=value β€” set one client option to the given value.

available client options are:

  • cafile β€” path to the file containing trusted certificate authority certificates. only used for TLS connections.
  • certfile β€” path to the file containing the public client certificate. only used for TLS connections.
  • keyfile β€” path to the file containing the private client key. only used for TLS connections.
  • priorities β€” priorities for the cipher suites to be used for the session.
  • -0, --stdin β€” continuously read and send metrics and states from standard input. uses all other fields specified on the command line. for each line on standard input, a new event will be sent to Riemann. if the input is a number, it will be used as a metric. if not, it will be used as the state. if it is a number, followed by a space and some string, then both metric and state will be set for the outgoing event.

πŸ’… CAVEATS πŸ’…

⏳ Timeouts ⏳

ngl bestie, this one matters: riemann-client will never timeout. if for instance it tries to communicate with a broken server and stays there forever, you could use the timeout command. periodt ⏳

πŸ”₯ EXAMPLES πŸ”₯

πŸ“ Sending an event πŸ“

$ riemann-client send --state ok \
                      --service "client-test" \
                      --host "my-host" \
                      --description "A message from the Manual" \
                      --tag tag-1 --tag tag-2 \
                      --attribute x-manual=best-friend \
                      --metric-sint64 1 \
                      --ttl 300.5 \
                      --tcp

🧚 Sending metrics / state from standard input 🧚

$ echo "1.5 ok" |  \
  riemann-client send --service "client-test: stdin" \
                      --host "my-host" \
                      --description "A message from STDIN" \
                      --tag stdin \
                      --tcp \
                      --stdin

⭐ Querying Riemann ⭐

$ riemann-client query 'host = "my-host"'

πŸ’œ Using TLS πŸ’œ

$ riemann-client query 'host = "my-host"' \
                       --tls \
                       --option cafile=tests/data/cacert.pem \
                       --option certfile=tests/data/client.crt \
                       --option keyfile=tests/data/client.key \
                       --option priorities=NORMAL \
                       localhost 5554

πŸ‘‘ AUTHOR πŸ‘‘

Gergely Nagy riemann@gergo.csillger.hu β€” iconic πŸ’–

🌈 SEE ALSO 🌈

timeout(1)


mwah πŸ’‹ β€” this RIEMANN-CLIENT(1) page comes from The MadHouse Project and is dated March 2016. byeee bestie, go communicate with Riemann and slay 🫢✨

πŸ“¦ where this page comes from