Writing to nagios.cmd in Distributed Monitoring

I would suggest to use the web API for that.