github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/internal/fs/cheats/req.md (about)

     1  # further documentation https://choria.io/docs/concepts/cli/
     2  
     3  # request the status of a service
     4  choria req service status service=httpd
     5  
     6  # restrict the query to a subset of nodes, see https://choria.io/docs/concepts/discovery/
     7  choria req service status service=httpd -C /apache/
     8  
     9  # restart services in a batched manner
    10  choria req service restart service=httpd --batch 10 --batch-sleep 30
    11  
    12  # filter replies, list host names where the service is not up
    13  choria req service status service=httpd --filter-replies 'ok() && data("status")!="running"' --senders
    14  
    15  # get results in JSON format
    16  choria req service status service=httpd --json
    17  
    18  # show only failed responses
    19  choria req service status service=httpd --display failed
    20  
    21  # target nodes listed in a file, reporting absent nodes
    22  choria req service status service=httpd --nodes nodes.txt