The X-pack package from Elastic is fully integrated with Elasticsearch and Kibana to provide (among other things) an alarm reporting platform.
I believe that the regular use case is to build that from Kibana, with alarms as the results of particular queries.
I want to use that, but I'm also considering to use it as the alarm infrastructure for my complete platform: that means that an application wanting to send an alarm, would for example write explicitely the message in ES and an alarm would be generated.
Is this stupid, am I missing something?
Well, you can go ahead do this. It will be working fine too. But the catch is why put up elastic search at all? Elastic search comes into picture only when you handle huge volumes of data. As in your case, you are wanting to store only alarms in elastic. If this is huge in number, this really isn't an alarm(raised too often). On the other side if these are too few in number, you need to rethink if you need to use the elastic search at all.