timestamp | Timestamp | Unix timestamp when the event happened.
host | String | [Host](09-object-types.md#objecttype-host) name.
service | String | [Service](09-object-types.md#objecttype-service) name. Optional if this is a host notification.
+ command | String | [NotificationCommand](09-object-types.md#objecttype-notificationcommand) name.
users | Array | List of notified [user](09-object-types.md#objecttype-user) names.
notification\_type | String | [$notification.type$](03-monitoring-basics.md#notification-runtime-macros) runtime macro value.
author | String | [$notification.author$](03-monitoring-basics.md#notification-runtime-macros) runtime macro value.
#include "icinga/apievents.hpp"
#include "icinga/service.hpp"
+#include "icinga/notificationcommand.hpp"
#include "remote/eventqueue.hpp"
#include "base/initialize.hpp"
#include "base/serializer.hpp"
if (service)
result->Set("service", service->GetShortName());
+ NotificationCommand::Ptr command = notification->GetCommand();
+
+ if (command)
+ result->Set("command", command->GetName());
+
ArrayData userNames;
for (const User::Ptr& user : users) {