Skip to content

Instantly share code, notes, and snippets.

@samnang
Forked from dwilkie/cgrates.md
Created December 11, 2025 03:53
Show Gist options
  • Select an option

  • Save samnang/78b0811edc30a72adbd32a16999592b2 to your computer and use it in GitHub Desktop.

Select an option

Save samnang/78b0811edc30a72adbd32a16999592b2 to your computer and use it in GitHub Desktop.
CGRateS commands

Useful CGrateS commands

Run ngrep on the cgrates container with JSON formatting

docker compose exec -it billing-engine sh -c \
'ngrep -d any -W byline port 2021 or 2013 or 2014 or 2080 or 2060 or 2012 | \
while read line; do
  echo "$line" | jq . 2>/dev/null || echo "$line"
done'

Run ngrep on the cgrates container without formatting only on 8021

docker compose exec -it billing-engine sh -c 'ngrep -d any -W byline port 8021'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment