There is not a way to create an alert definition through the CLI. I think it may be possible in the future using the REST API?
I don't know that even the REST API supports *creating* alert definitions at the moment, though.
As a side note, the server can take the information from an alert once it is fired and use it in server-side or CLI scripts.
Do you mean you want to send in your own alerts? If so can you tell us a bit more about your use case? At the moment I don't think we have the ability to directly incorporate alerts from external systems, although i can certainly see it as a useful mechanism. One idea that would work with what we have today would be to have a mechanism that generated external alerts data into a file being monitored by RHQ as a log file, where each log entry was an alert. These would then be picked up as RHQ Events, and could be alerted on as needed because RHQ Alerts can be generated from Events.
I meant creating alert definitions. We have JON setup for our Test environment and have created many alert definitions that we would like to clone onto the Prod environment.
Also, when a new release is deployed to the ESB, we would like to be able to quickly create the alert definitions. Each release package contains a release number in the name, so when a new release is made, JON treats it as a new deployment and the alert definitions on the previous release need to be copied over.