Notifications in WatcherΒΆ

Event type Notification class Payload class Sample
audit.strategy.end AuditActionNotification AuditActionPayload
{
  "priority": "INFO",
  "payload": {
    "watcher_object.data": {
      "audit_type": "ONESHOT",
      "parameters": {
        "para2": "hello",
        "para1": 3.2
      },
      "state": "ONGOING",
      "updated_at": null,
      "deleted_at": null,
      "fault": null,
      "goal": {
        "watcher_object.data": {
          "uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
          "name": "dummy",
          "updated_at": null,
          "deleted_at": null,
          "efficacy_specification": [],
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy goal"
        },
        "watcher_object.name": "GoalPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "interval": null,
      "scope": [],
      "strategy": {
        "watcher_object.data": {
          "parameters_spec": {
            "properties": {
              "para2": {
                "type": "string",
                "default": "hello",
                "description": "string parameter example"
              },
              "para1": {
                "description": "number parameter example",
                "maximum": 10.2,
                "type": "number",
                "default": 3.2,
                "minimum": 1.0
              }
            }
          },
          "name": "dummy",
          "uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
          "updated_at": null,
          "deleted_at": null,
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy strategy"
        },
        "watcher_object.name": "StrategyPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "created_at": "2016-11-04T16:29:20Z",
      "uuid": "4a97b9dd-2023-43dc-b713-815bdd94d4d6"
    },
    "watcher_object.name": "AuditActionPayload",
    "watcher_object.version": "1.0",
    "watcher_object.namespace": "watcher"
  },
  "publisher_id": "infra-optim:localhost",
  "timestamp": "2016-11-04 16:31:36.264673   ",
  "event_type": "audit.strategy.end",
  "message_id": "cbcf9f2c-7c53-4b4d-91ec-db49cca024b6"
}
audit.strategy.error AuditActionNotification AuditActionPayload
{
  "priority": "ERROR",
  "payload": {
    "watcher_object.data": {
      "audit_type": "ONESHOT",
      "parameters": {
        "para2": "hello",
        "para1": 3.2
      },
      "state": "ONGOING",
      "updated_at": null,
      "deleted_at": null,
      "fault": {
        "watcher_object.data": {
          "exception": "WatcherException",
          "exception_message": "TEST",
          "function_name": "test_send_audit_action_with_error",
          "module_name": "watcher.tests.notifications.test_audit_notification"
        },
        "watcher_object.name": "ExceptionPayload",
        "watcher_object.namespace": "watcher",
        "watcher_object.version": "1.0"
      },
      "goal": {
        "watcher_object.data": {
          "uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
          "name": "dummy",
          "updated_at": null,
          "deleted_at": null,
          "efficacy_specification": [],
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy goal"
        },
        "watcher_object.name": "GoalPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "interval": null,
      "scope": [],
      "strategy": {
        "watcher_object.data": {
          "parameters_spec": {
            "properties": {
              "para2": {
                "type": "string",
                "default": "hello",
                "description": "string parameter example"
              },
              "para1": {
                "description": "number parameter example",
                "maximum": 10.2,
                "type": "number",
                "default": 3.2,
                "minimum": 1.0
              }
            }
          },
          "name": "dummy",
          "uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
          "updated_at": null,
          "deleted_at": null,
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy strategy"
        },
        "watcher_object.name": "StrategyPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "created_at": "2016-11-04T16:29:20Z",
      "uuid": "4a97b9dd-2023-43dc-b713-815bdd94d4d6"
    },
    "watcher_object.name": "AuditActionPayload",
    "watcher_object.version": "1.0",
    "watcher_object.namespace": "watcher"
  },
  "publisher_id": "infra-optim:localhost",
  "timestamp": "2016-11-04 16:31:36.264673   ",
  "event_type": "audit.strategy.error",
  "message_id": "cbcf9f2c-7c53-4b4d-91ec-db49cca024b6"
}
audit.strategy.start AuditActionNotification AuditActionPayload
{
  "priority": "INFO",
  "payload": {
    "watcher_object.data": {
      "audit_type": "ONESHOT",
      "parameters": {
        "para2": "hello",
        "para1": 3.2
      },
      "state": "ONGOING",
      "updated_at": null,
      "deleted_at": null,
      "fault": null,
      "goal": {
        "watcher_object.data": {
          "uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
          "name": "dummy",
          "updated_at": null,
          "deleted_at": null,
          "efficacy_specification": [],
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy goal"
        },
        "watcher_object.name": "GoalPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "interval": null,
      "scope": [],
      "strategy": {
        "watcher_object.data": {
          "parameters_spec": {
            "properties": {
              "para2": {
                "type": "string",
                "default": "hello",
                "description": "string parameter example"
              },
              "para1": {
                "description": "number parameter example",
                "maximum": 10.2,
                "type": "number",
                "default": 3.2,
                "minimum": 1.0
              }
            }
          },
          "name": "dummy",
          "uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
          "updated_at": null,
          "deleted_at": null,
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy strategy"
        },
        "watcher_object.name": "StrategyPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "created_at": "2016-11-04T16:29:20Z",
      "uuid": "4a97b9dd-2023-43dc-b713-815bdd94d4d6"
    },
    "watcher_object.name": "AuditActionPayload",
    "watcher_object.version": "1.0",
    "watcher_object.namespace": "watcher"
  },
  "publisher_id": "infra-optim:localhost",
  "timestamp": "2016-11-04 16:31:36.264673   ",
  "event_type": "audit.strategy.start",
  "message_id": "cbcf9f2c-7c53-4b4d-91ec-db49cca024b6"
}
audit.create AuditCreateNotification AuditCreatePayload
{
  "priority": "INFO",
  "payload": {
    "watcher_object.data": {
      "audit_type": "ONESHOT",
      "parameters": {
        "para2": "hello",
        "para1": 3.2
      },
      "state": "PENDING",
      "updated_at": null,
      "deleted_at": null,
      "goal": {
        "watcher_object.data": {
          "uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
          "name": "dummy",
          "updated_at": null,
          "deleted_at": null,
          "efficacy_specification": [],
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy goal"
        },
        "watcher_object.name": "GoalPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "interval": null,
      "scope": [],
      "strategy": {
        "watcher_object.data": {
          "parameters_spec": {
            "properties": {
              "para2": {
                "type": "string",
                "default": "hello",
                "description": "string parameter example"
              },
              "para1": {
                "description": "number parameter example",
                "maximum": 10.2,
                "type": "number",
                "default": 3.2,
                "minimum": 1.0
              }
            }
          },
          "name": "dummy",
          "uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
          "updated_at": null,
          "deleted_at": null,
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy strategy"
        },
        "watcher_object.name": "StrategyPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "created_at": "2016-11-04T16:29:20Z",
      "uuid": "4a97b9dd-2023-43dc-b713-815bdd94d4d6"
    },
    "watcher_object.name": "AuditCreatePayload",
    "watcher_object.version": "1.0",
    "watcher_object.namespace": "watcher"
  },
  "publisher_id": "infra-optim:localhost",
  "timestamp": "2016-11-04 16:31:36.264673   ",
  "event_type": "audit.create",
  "message_id": "cbcf9f2c-7c53-4b4d-91ec-db49cca024b6"
}
audit.delete AuditDeleteNotification AuditDeletePayload
{
  "priority": "INFO",
  "payload": {
    "watcher_object.data": {
      "audit_type": "ONESHOT",
      "parameters": {
        "para2": "hello",
        "para1": 3.2
      },
      "state": "DELETED",
      "updated_at": null,
      "deleted_at": null,
      "goal": {
        "watcher_object.data": {
          "uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
          "name": "dummy",
          "updated_at": null,
          "deleted_at": null,
          "efficacy_specification": [],
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy goal"
        },
        "watcher_object.name": "GoalPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "interval": null,
      "scope": [],
      "strategy": {
        "watcher_object.data": {
          "parameters_spec": {
            "properties": {
              "para2": {
                "type": "string",
                "default": "hello",
                "description": "string parameter example"
              },
              "para1": {
                "description": "number parameter example",
                "maximum": 10.2,
                "type": "number",
                "default": 3.2,
                "minimum": 1.0
              }
            }
          },
          "name": "dummy",
          "uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
          "updated_at": null,
          "deleted_at": null,
          "created_at": "2016-11-04T16:25:35Z",
          "display_name": "Dummy strategy"
        },
        "watcher_object.name": "StrategyPayload",
        "watcher_object.version": "1.0",
        "watcher_object.namespace": "watcher"
      },
      "created_at": "2016-11-04T16:29:20Z",
      "uuid": "4a97b9dd-2023-43dc-b713-815bdd94d4d6"
    },
    "watcher_object.name": "AuditDeletePayload",
    "watcher_object.version": "1.0",
    "watcher_object.namespace": "watcher"
  },
  "publisher_id": "infra-optim:localhost",
  "timestamp": "2016-11-04 16:31:36.264673   ",
  "event_type": "audit.delete",
  "message_id": "cbcf9f2c-7c53-4b4d-91ec-db49cca024b6"
}
audit.update AuditUpdateNotification AuditUpdatePayload
{
  "publisher_id": "infra-optim:localhost",
  "timestamp": "2016-11-04 16:51:38.722986   ",
  "payload": {
    "watcher_object.name": "AuditUpdatePayload",
    "watcher_object.data": {
      "strategy": {
        "watcher_object.name": "StrategyPayload",
        "watcher_object.data": {
          "name": "dummy",
          "parameters_spec": {
            "properties": {
              "para2": {
                "default": "hello",
                "type": "string",
                "description": "string parameter example"
              },
              "para1": {
                "maximum": 10.2,
                "default": 3.2,
                "minimum": 1.0,
                "description": "number parameter example",
                "type": "number"
              }
            }
          },
          "updated_at": null,
          "display_name": "Dummy strategy",
          "deleted_at": null,
          "uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
          "created_at": "2016-11-04T16:25:35Z"
        },
        "watcher_object.namespace": "watcher",
        "watcher_object.version": "1.0"
      },
      "scope": [],
      "created_at": "2016-11-04T16:51:21Z",
      "uuid": "f1e0d912-afd9-4bf2-91ef-c99cd08cc1ef",
      "goal": {
        "watcher_object.name": "GoalPayload",
        "watcher_object.data": {
          "efficacy_specification": [],
          "updated_at": null,
          "name": "dummy",
          "display_name": "Dummy goal",
          "deleted_at": null,
          "uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
          "created_at": "2016-11-04T16:25:35Z"
        },
        "watcher_object.namespace": "watcher",
        "watcher_object.version": "1.0"
      },
      "parameters": {
        "para2": "hello",
        "para1": 3.2
      },
      "deleted_at": null,
      "state_update": {
        "watcher_object.name": "AuditStateUpdatePayload",
        "watcher_object.data": {
          "state": "ONGOING",
          "old_state": "PENDING"
        },
        "watcher_object.namespace": "watcher",
        "watcher_object.version": "1.0"
      },
      "interval": null,
      "updated_at": null,
      "state": "ONGOING",
      "audit_type": "ONESHOT"
    },
    "watcher_object.namespace": "watcher",
    "watcher_object.version": "1.0"
  },
  "priority": "INFO",
  "event_type": "audit.update",
  "message_id": "697fdf55-7252-4b6c-a2c2-5b9e85f6342c"
}
infra.optim.exception ExceptionNotification ExceptionPayload
{
    "event_type": "infra-optim.exception",
    "payload": {
        "watcher_object.data": {
            "exception": "NoAvailableStrategyForGoal",
            "exception_message": "No strategy could be found to achieve the server_consolidation goal.",
            "function_name": "_aggregate_create_in_db",
            "module_name": "watcher.objects.aggregate"
        },
        "watcher_object.name": "ExceptionPayload",
        "watcher_object.namespace": "watcher",
        "watcher_object.version": "1.0"
    },
    "priority": "ERROR",
    "publisher_id": "watcher-api:fake-mini"
}