It depends on how your coin has the 'sendalert' command coded. In order to use the 'sendalert' command the parameters typically go: The message you want to send is the 1st parameter, the 2nd is the private key for every coin I've looked at. Haven't looked at peercoin though. Typing 'help sendalert', or sendalert with no parameters into your console should return the help message with the details spelled out.
However knowing what priority to use depends on what other parts of the code use for things like out of hard disk space or major coin forks detected, stuff like that which should always take priority when it comes to alerting the user to issues detected by their client and displayed as the highest priority Alert message. Picking an alert id is important from the perspective of being able to send another one later on that can delete all the previously issued alerts of a lower value. That is about all you really need to be known, in order to use the alert system.
Spent a great deal of time on this in Sept for Ixcoin codebase while working on our 0.9.2.1/0.9.3 release.
Wish I'd made the alert commits separate from allot of other stuff, I was working on at the time, so I could reference you to those specific changes. Originally added the 'sendalert' command code to rpcmisc.cpp, then moved it to rpcnet.cpp, where I think it belongs.
We only build that command into non-release code, but everyone gets the benefit now of being able to use the 'getnetworkinfo' command, where they can see ALL the alerts propagating over the network in the JSON response string returned. Also our sendalert method offers (for those that know the private key) optional parameters for setting the number of days an alert is relayed, as well as when it expires, not just canceling previous alerts as an optional parameter like I'd seen in many other coins. My code base and commit history here could possibly help you some:
https://github.com/GroundRod/IXCoin/tree/iXcoin/srcThink the commits on Sept 24th & the 30th were the most relevant to your question:
https://github.com/GroundRod/IXCoin/commits/iXcoin/srchttps://github.com/GroundRod/IXCoin/commit/304ec765b20fcda0f5f65847b62c47926a18a8d3I know that Gavin has done allot of work recently & been changing this part of the code in Bitcoin source, as it heads into rc1, at some point I'll be re-visiting those changes as we once again migrate up...
Hope that helps,
GR
ETA: Thanks gatra for that link to laanwj's commit, had not seen that particular way of doing sendalert before, it's interesting, yet I still don't like the idea of building an executable with the private key, don't ever let that version get out for your coin, or anyone could generate them.