Module: kamailio Branch: master Commit: e8086c7db45d5b0136e4c5871cb1a2c5a0e1d5d5 URL: https://github.com/kamailio/kamailio/commit/e8086c7db45d5b0136e4c5871cb1a2c5...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-12-02T08:43:10+01:00
kamctl: implemented moni command for jsonrpc engine
---
Modified: utils/kamctl/kamctl.rpcfifo
---
Diff: https://github.com/kamailio/kamailio/commit/e8086c7db45d5b0136e4c5871cb1a2c5... Patch: https://github.com/kamailio/kamailio/commit/e8086c7db45d5b0136e4c5871cb1a2c5...
---
diff --git a/utils/kamctl/kamctl.rpcfifo b/utils/kamctl/kamctl.rpcfifo index 5fa09a1..27929dd 100644 --- a/utils/kamctl/kamctl.rpcfifo +++ b/utils/kamctl/kamctl.rpcfifo @@ -204,15 +204,23 @@ rpc_kamailio_monitor() {
cat < $path | filter_fl & cat > $RPCFIFOPATH <<EOF -:version:$name - +{ + "jsonrpc": "2.0", + "method": "core.version", + "reply_name": "${name}", + "id": $$ +} EOF wait
cat < $path | filter_fl & cat > $RPCFIFOPATH << EOF -:uptime:$name - +{ + "jsonrpc": "2.0", + "method": "core.uptime", + "reply_name": "${name}", + "id": $$ +} EOF wait echo @@ -220,11 +228,13 @@ EOF mecho "Transaction Statistics: " cat < $path | filter_fl & cat > $RPCFIFOPATH <<EOF -:get_statistics:$name -UAS_transactions -UAC_transactions -inuse_transactions - +{ + "jsonrpc": "2.0", + "method": "stats.get_statistics", + "params": [ "UAS_transactions", "UAC_transactions", "inuse_transactions"], + "reply_name": "${name}", + "id": $$ +} EOF wait echo @@ -232,11 +242,13 @@ EOF mecho "Stateless Server Statistics: " cat < $path | filter_fl & cat > $RPCFIFOPATH <<EOF -:get_statistics:$name -sent_replies -sent_err_replies -received_ACKs - +{ + "jsonrpc": "2.0", + "method": "stats.get_statistics", + "params": [ "sent_replies", "sent_err_replies", "received_ACKs"], + "reply_name": "${name}", + "id": $$ +} EOF wait echo @@ -244,9 +256,13 @@ EOF mecho "UsrLoc Stats: " cat < $path | filter_fl & cat > $RPCFIFOPATH <<EOF -:get_statistics:$name -usrloc: - +{ + "jsonrpc": "2.0", + "method": "stats.get_statistics", + "params": [ "usrloc:"], + "reply_name": "${name}", + "id": $$ +} EOF wait