How-to debug ntopng
This article explains how to debug ntopng while working with Checkmk
LAST TESTED ON CHECKMK 2.3.0P1
Table of Contents
More information on ntop can be found here: ntop guide
Debugging
Show active flows
root@mylinuxhost ~# curl -u admin:cmk1234567 "http://127.0.0.1:3000/lua/rest/v1/get/flow/active.lua?ifid=0" {"rc_str_hr":"Success","rc":0,"rsp":{"perPage":2000,"currentPage":1,"sort":[["column_column_bytes","asc"]],"totalRows":0,"data":[]},"rc_str":"OK"}
Get flow counters for the L4 protocol
root@mylinuxhost ~# curl -u admin:cmk1234567 "http://127.0.0.1:3000/lua/rest/v1/get/flow/l4/counters.lua?ifid=0" {"rsp":[],"rc_str_hr":"Success","rc":0,"rc_str":"OK"}
Get flow counters for the L7 protocol
root@mylinuxhost ~# curl -u admin:cmk1234567 "http://127.0.0.1:3000/lua/rest/v1/get/flow/l7/counters.lua?ifid=0" {"rsp":[],"rc_str_hr":"Success","rc":0,"rc_str":"OK"}
Get ntop alerts
root@mylinuxhost ~# curl -u admin:cmk1234567 -H "Content-Type: application/json" -d '{"ifid": "0", "status": "historical-flows", "epoch_begin": 1590710400, "epoch_end": 1673652781}' http://localhost:3000/lua/rest/v1/get/alert/ts.lua
Get ntop top talker
Only available in the pro version ntop dashboard
For interfaces
root@mylinuxhost ~# curl -u admin:cmk1234567 "http://127.0.0.1:3000/lua/pro/rest/v1/get/interface/top/local/talkers.lua?ifid=0"
root@mylinuxhost ~# curl -u admin:cmk1234567 "http://127.0.0.1:3000/lua/pro/rest/v1/get/host/top/remote/talkers.lua?ifid=0"
For hosts
root@mylinuxhost ~# curl -u admin:cmk1234567 "http://127.0.0.1:3000/lua/pro/rest/v1/get/host/top/remote/talkers.lua?ifid=0"
Related articles