Hi:
Yes, you can use a script that sends the info.
Could use python, or call the kafka/bin/kafka-console-producer.sh command
line tool that comes with Kafka.
But note that the message can not just contain user, host, displays.
You may actually omit the user & host, that's just for logging tools that might want to show
who changed something. The alarm server and clients don't care about the user/host. But you must always include the complete configuration, i.e.,
description, delay, count, filter, guidance, displays, commands, actions. If you just send displays, that would be the same as deleting guidance,
commands, actions, description, and clearing filter etc.
-Kay
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of John Dobbins via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, August 19, 2021 4:31 PM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] Configuring Phoebus alarm related display via a kafka message
All,
I am looking to write a script which will set the related display info for a number of already configured alarms in Phoebus.
Can I send a kafka config message with JSON specifying just the user, host and display?
{
"user": String,
"host": String,
"displays": [{"title": String, "details": String}],
}
or will that unset the fields I have not specified?
Regards,
John Dobbins
Research Support Specialist
Cornell High Energy Synchrotron Source
Cornell University
|