Mapping subscriber account to Action Plan in Cgrates logs

28 views
Skip to first unread message

simba masamba

unread,
Jun 11, 2026, 6:40:12 AMJun 11
to CGRateS
Good day Team,

I have a CGRates instance and I am trying to setup a report using the log files from /var/log/cgrates.

At the beginning of each month, I have subscriber postpay accounts that have their accounts reset of their balance. This is setup using action plans with each ActionPlan being unique to a subscriber's balance.

e.g subscriber : 1001
Subscriber Action Plan: "ACTION_PLAN_RESET_500_MONTHLY"

this is working fine, and I can see from the logs that SchedulerS kicks in when the time arrrives and runs the below, leaving log:

2026-06-01T00:00:00.003864+00:00 lab-cgrates CGRateS <lab-cgrates> [254383]: <Scheduler> Action: ACTION_RESET_500_MONTHLY
2026-06-01T00:00:00.004118+00:00 lab-cgrates CGRateS <lab-cgrates> [254383]: <Scheduler> Scheduler queue length: 178

My question is, how can I see which subscriber account successfully / failed to have its Action plan run when SchedulerS ran all the action plans.
I want a scenario where I can see for example:
e.g. sub: 1001, ActionPlan: 500 status: success/failed

how can I achieve this or correlate the logs?

Regards,

Simba

Arber Katellari

unread,
Jun 11, 2026, 10:35:26 AMJun 11
to CGRateS
Hello Simba,

There are multiple places where an action can fail to execute for an account and for multiple reasons. If an action fails to execute, we will log an error starting with `Error executing action (reson of error)`, but this doesn't necessarily log on which account the action failed. We do log failures, but they can have a bunch of different formats since they can have multiple reasons for failing.

If all you need to do is determine that all accounts got their action applied, what you can do is attach a `*cdrlog` action to the action plan, with smaller weight than the reset action. This will make it so every time the scheduler triggers the action plan, the accounts will be reset, and after that, a CDR will be generated for that account showing the new balances that were reset.
Hope this helps!

Kind regards,
Arber

simba masamba

unread,
Jun 12, 2026, 10:34:20 AMJun 12
to cgr...@googlegroups.com
Thank you for your response, I shall lab this up to test it.

--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cgrates/82f01b6b-bcd1-49fc-9e68-daaf88ddbf94n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages