cancel
Showing results for 
Search instead for 
Did you mean: 

SAP-CC - Alert Triggering Operator

isaugust
Discoverer
0 Kudos

Hello all,

I'm trying to use the alert function to log error messages in my charge. In the documentation says:

During the charging process or refilling process, the SAP CC Core Server system sends a USER_ALERT notification when executing a price plan, a charging plan, or the refill logic that includes an alert triggering operator.

(https://help.sap.com/docs/Convergent_Charging/84a35cad6dc24e4f8bfe45c25c8394b8/4cf675e3ce0b4e0f9df6e2add7055879.html?locale=en-US&version=2020.2)

However, I'm only able to see the messages generated from the Alert Trigger Operator in the rater logs, when I set the parameter LS_TRC_SEVERITY to DEBUG.

Is there a way to have the messages from the Alert Trigger Operator without setting the parameter to DEBUG?

In the Tuning Guide says that the parameter USER_ALERT should be activated to log the alert informations, but it doesn't show how to do that and where do I have to change it.

(https://help.sap.com/doc/0361045c272d4f98b4757516f1277f06/2020.2/en-US/TuningGuideCC5-0-5.pdf)

BR,

Isaque


Accepted Solutions (1)

Accepted Solutions (1)

francois_thimon
Advisor
Advisor

Hi Isaque,

The "USER_ALERT" you're referring to is not an actual parameter but a type of event that can be processed by Convergent Charging's notification engine (the other types are AUTHENTICATION_FAILURE, AMOUNT_ALERT, DB_LINK_DOWN, INSTANCE_UP, etc.).

The events fall into two categories:
- "ABM" (Accounts and Balance Management): everything about expired subscriber accounts, overspending, etc. User alerts are part of this one.
- "Administrative": everything about the CC system's life-cycle, such as when a server or the database is up/down, when a serious error affects the JVM, or someone attempting to log in with invalid credentials.

For each type of event, if you want to be reported, you need to choose the channel(s) through which CC will send you the corresponding notification(s): network, JCo/multi JCo destination, or Customer Management Area routing.
The details are given in our Tuning guide, in section "Configuring the notification policy".
Here's the link to the HTML page for CC 2020 FPS 2 (this version is more user-friendly than the PDF document):
https://help.sap.com/docs/Convergent_Charging/4c9aeffd94de48f8ba0253b7e1e6e50f/1d7bd1cede864d1d8d96c...

In order to instruct CC to use a channel, you need to specify it in what we call the "notification policy".
For that, you'll have to export the current policy into an XML file (using Setup tool), modify that file with the expected instructions, and reimport it (using Setup tool again).
Here's Setup tool's documentation to export the file (it also references the documentation for the import, at the end):
https://help.sap.com/docs/Convergent_Charging/c7120011d1c244168dc1f945a06f1350/bba570ea0b8f47748d6db...

Normally, CC batches the notifications in CSV files and sends them to a JCo server (similarly to the process of creating billable/consumptions items).
Your case is different because, for "user alerts", only the "network" channel works (this is stated in a "Note", around the middle of the Tuning guide page referenced above).
The reason for this restriction is that user alerts are based only on custom properties, which cannot be interpreted by standard JCo destinations. Consequently, you have no choice but send your user alerts to a third-party application, that you must develop yourself based on our Java SDK (the Tuning guide also explains that, right above the "Note").
The Tuning guide also gives detailed examples of valid notification policies, with several types of events and channels.
Finally, to help you develop your own Java notification client, here's the link to our Javadoc:
https://help.sap.com/doc/d847860d561a47568a936d5f3cbeb9da/2020.2/en-US/core_javadoc/index.html?com/h...

There, you'll mainly be interested in:
- NotificationServiceClient: instances of this class connect to the CC dispatcher and then get "network" notifications.
- NotificationHandler: this is the interface you need to implement in order to define your custom response to each notification (you'll first have to pass your custom NotificationHandler to the client above, using setNotificationHandler).

Can you please try that, and let us know if you need any additional details?

Best regards.

François
SAP Convergent Charging Support

0 Kudos

Hi Francois,

I hope this message finds you well. We're currently engaged in a project focused on Notifications (USER_ALERT) within the context of Convergent Charging. Our objective is to achieve asynchronous data transfer to a dedicated workflow in CM.

On Mediation side, it was implemented the "CC Notification Agent," which relies on the NotificationServiceClient object (I don't see any handler in CM, but it could be an internal stuff of the agent. In any case we are not in charge of CM topics so I want to be sure that we are not missing something on CC side).

Furthermore, within the Convergent Charging setup tool, we've defined the following notification policy and the core server was restarted (we can see the activation log of the policy in the Dispatcher log):

<?xml version="1.0" encoding="UTF-8"?>
<notificationPolicy> 
    <filters>
        <set id="12" />
    </filters>
    <network />
</notificationPolicy>

In addition, we've ensured that the alert operator is correctly maintained within the pricing logics, and it works as expected in the response.

While the Convergent Mediation connection to the Dispatcher instance has been correctly established, however, our current challenge lies in achieving an asynchronous push of each notification, which should be received by CM via the socket.

We've observed the log in the rater instance, which logs the method NotificationHelper.publish(), and we have a specific concern regarding the parameter "outsideTransaction," which is set to FALSE (I expected TRUE).

Apart of this last point, it appears that everything is in order, but we're facing difficulties in achieving the asynchronous push to CM. Your expert insights and guidance would be greatly appreciated to help us resolve this issue.

Thank you for your time and support.

Best regards,
Alessandro

Answers (3)

Answers (3)

francois_thimon
Advisor
Advisor

Hi again Alessandro,

I just got more advice from a colleague: before even running the tests suggested in my previous reply, can you please first make sure you have also imported the required notification policy for the whole CC system?
As a reminder, the notification policy comes in three parts: "raters", "bulkloaders", and "all instances".
To get your "user alert" notifications to your client, you need to enable the "network" feature specifically for the rater (as you've already done), but also at the global level, as follows:

setup.sh notificationpolicy import notifpolicy-system_level-with_network_enabled.xml

Can you please try that first, and let us know if you still need help?

Best regards.

François
SAP Convergent Charging Support

0 Kudos

Hi Thimon,

thanks for your prompt reply!

During the import process, we did not specify any specific instance, so it should be activated globally in my understanding, is this correct? To clarify, the <target_inst_type> field was left blank:

Regarding connected clients, we can observe the CM client as follows (IP are local):

In reference to the SSL topic, CM is not utilizing SSL; they are using USER\PASSWORD. Is this potentially incorrect?

Thanks for your support and time!

Best regards,
Alessandro

francois_thimon
Advisor
Advisor

Hi Alessandro,

I'm not sure why you're not getting the notifications in the client, but "CC Notification Agent" (backed by NotificationServiceClient, in the CC SDK) is indeed the right choice.

If you need to confirm that your CM agent is properly connected to the CC dispatcher, will you please log into admin+ and run "list_clients"?
This will output the detailed list of all registered clients (for charging and notifications). You can then recognise them based on their source IP address and TCP port, their CC user account (if authentication is required by CC), and the connection date/time.
If your agent doesn't show there, something's wrong with the connection.
Are you using SSL or not? (this is probably relevant, in the present case)

The notifications are produced by the rater, but actually sent to clients through the dispatcher.
If it comes down to that, you may therefore want to enable the "NET" debug traces in the dispatcher in order to monitor all the TCP traffic, but they're extremely verbose so it may be difficult to identify the messages sent to your client (this will log the communications with all the CC instances and client applications).
If CM offers logging features, they'll certainly be easier to use.

Best regards.

François
SAP Convergent Charging Support

0 Kudos

Hi Francois,

We have definitively solved the issue thanks to your suggestion!
The problem was that the policy had only been activated at global level. The solution was to perform the import twice, both at global level and, explicitly, for the rater instance.

setup.sh notificationpolicy import notifpolicy.rater.xml rater -login=admin
setup.sh notificationpolicy import notifpolicy.global.xml -login=admin

Thank you very much for your time and the invaluable support you provided to help us solve the problem.

Thanks,
Alessandro