node_exporter: fix RuboCop Style/TrailingBodyOnMethodDefinition.
parent
6162cb8a40
commit
49985a5a8d
|
@ -25,44 +25,46 @@ class NodeExporter < Formula
|
||||||
prefix.install_metafiles
|
prefix.install_metafiles
|
||||||
end
|
end
|
||||||
|
|
||||||
def caveats; <<~EOS
|
def caveats
|
||||||
When used with `brew services`, node_exporter's configuration is stored as command line flags in
|
<<~EOS
|
||||||
#{etc}/node_exporter.args
|
When used with `brew services`, node_exporter's configuration is stored as command line flags in
|
||||||
|
#{etc}/node_exporter.args
|
||||||
|
|
||||||
Example configuration:
|
Example configuration:
|
||||||
echo --web.listen-address :9101 > #{etc}/node_exporter.args
|
echo --web.listen-address :9101 > #{etc}/node_exporter.args
|
||||||
|
|
||||||
For the full list of options, execute
|
For the full list of options, execute
|
||||||
node_exporter -h
|
node_exporter -h
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
plist_options :manual => "node_exporter"
|
plist_options :manual => "node_exporter"
|
||||||
|
|
||||||
def plist; <<~EOS
|
def plist
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<<~EOS
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<plist version="1.0">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<dict>
|
<plist version="1.0">
|
||||||
<key>Label</key>
|
<dict>
|
||||||
<string>#{plist_name}</string>
|
<key>Label</key>
|
||||||
<key>ProgramArguments</key>
|
<string>#{plist_name}</string>
|
||||||
<array>
|
<key>ProgramArguments</key>
|
||||||
<string>sh</string>
|
<array>
|
||||||
<string>-c</string>
|
<string>sh</string>
|
||||||
<string>#{opt_bin}/node_exporter $(< #{etc}/node_exporter.args)</string>
|
<string>-c</string>
|
||||||
</array>
|
<string>#{opt_bin}/node_exporter $(< #{etc}/node_exporter.args)</string>
|
||||||
<key>RunAtLoad</key>
|
</array>
|
||||||
<true/>
|
<key>RunAtLoad</key>
|
||||||
<key>KeepAlive</key>
|
<true/>
|
||||||
<false/>
|
<key>KeepAlive</key>
|
||||||
<key>StandardErrorPath</key>
|
<false/>
|
||||||
<string>#{var}/log/node_exporter.err.log</string>
|
<key>StandardErrorPath</key>
|
||||||
<key>StandardOutPath</key>
|
<string>#{var}/log/node_exporter.err.log</string>
|
||||||
<string>#{var}/log/node_exporter.log</string>
|
<key>StandardOutPath</key>
|
||||||
</dict>
|
<string>#{var}/log/node_exporter.log</string>
|
||||||
</plist>
|
</dict>
|
||||||
EOS
|
</plist>
|
||||||
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
test do
|
test do
|
||||||
|
|
Loading…
Reference in New Issue