Making PoC follow spec regarding to the "kapow route" command and, incidentally creating a new "kapow server" command.
This commit is contained in:
@@ -16,26 +16,26 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
kroute add /list/files -c 'ls -la $(request /param/path) | response /body'
|
||||
kapow route add /list/files -c 'ls -la $(request /param/path) | response /body'
|
||||
|
||||
kroute add /list/processes -c 'ps -aux | response /body'
|
||||
kapow route add /list/processes -c 'ps -aux | response /body'
|
||||
|
||||
kroute add /show/cpuinfo -c 'response /body < /proc/cpuinfo'
|
||||
kapow route add /show/cpuinfo -c 'response /body < /proc/cpuinfo'
|
||||
|
||||
kroute add /show/memory -c 'free -m | response /body'
|
||||
kapow route add /show/memory -c 'free -m | response /body'
|
||||
|
||||
kroute add /show/disk -c 'df -h | response /body'
|
||||
kapow route add /show/disk -c 'df -h | response /body'
|
||||
|
||||
kroute add /show/connections -c 'ss -pluton | response /body'
|
||||
kapow route add /show/connections -c 'ss -pluton | response /body'
|
||||
|
||||
kroute add /show/mounts -c 'mount | response /body'
|
||||
kapow route add /show/mounts -c 'mount | response /body'
|
||||
|
||||
kroute add /tail/dmesg - <<-'EOF'
|
||||
kapow route add /tail/dmesg - <<-'EOF'
|
||||
response /header/Content-Type text/plain
|
||||
dmesg -w | response /stream
|
||||
EOF
|
||||
|
||||
kroute add /tail/journal - <<-'EOF'
|
||||
kapow route add /tail/journal - <<-'EOF'
|
||||
response /header/Content-Type text/plain
|
||||
journalctl -f | response /stream
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user