Controller notifications

Controller notifications can be received from the controller, they can be used to get information about computes and appliance.

Notification endpoints

Listen to the HTTP stream endpoint or to the WebSocket endpoint.

It is recommended to use the WebSocket endpoint.

Available notifications

ping

Keep-alive between client and controller. Also used to receive the current CPU and memory usage.

{
    "compute_id": 12
}

compute.created

A compute has been created.

{
    "capabilities": {
        "node_types": [],
        "version": null
    },
    "compute_id": "my_compute",
    "connected": false,
    "cpu_usage_percent": null,
    "host": "localhost",
    "last_error": null,
    "memory_usage_percent": null,
    "name": "http://julien@localhost:84",
    "port": 84,
    "protocol": "http",
    "user": "julien"
}

compute.updated

A compute has been updated.

{
    "capabilities": {
        "node_types": [],
        "version": null
    },
    "compute_id": "my_compute_id",
    "connected": false,
    "cpu_usage_percent": null,
    "host": "localhost",
    "last_error": null,
    "memory_usage_percent": null,
    "name": "http://julien@localhost:84",
    "port": 84,
    "protocol": "https",
    "user": "julien"
}

compute.deleted

A compute has been deleted.

{
    "capabilities": {
        "node_types": [],
        "version": null
    },
    "compute_id": "my_compute_id",
    "connected": false,
    "cpu_usage_percent": null,
    "host": "localhost",
    "last_error": null,
    "memory_usage_percent": null,
    "name": "http://julien@localhost:84",
    "port": 84,
    "protocol": "http",
    "user": "julien"
}

template.created

A template has been created.

{
    "builtin": false,
    "category": "switch",
    "compute_id": "local",
    "default_name_format": "Hub{0}",
    "name": "Ethernet hub template",
    "ports_mapping": [
        {
            "name": "Ethernet0",
            "port_number": 0
        },
        {
            "name": "Ethernet1",
            "port_number": 1
        },
        {
            "name": "Ethernet2",
            "port_number": 2
        },
        {
            "name": "Ethernet3",
            "port_number": 3
        },
        {
            "name": "Ethernet4",
            "port_number": 4
        },
        {
            "name": "Ethernet5",
            "port_number": 5
        },
        {
            "name": "Ethernet6",
            "port_number": 6
        },
        {
            "name": "Ethernet7",
            "port_number": 7
        }
    ],
    "symbol": ":/symbols/hub.svg",
    "template_id": "c4e656c5-2adb-4659-9303-60ed58edd9e6",
    "template_type": "ethernet_hub"
}

template.updated

A template has been updated.

{
    "base_script_file": "vpcs_base_config.txt",
    "builtin": false,
    "category": "guest",
    "compute_id": "local",
    "console_auto_start": false,
    "console_type": "telnet",
    "default_name_format": "PC{0}",
    "name": "VPCS_TEST_RENAMED",
    "symbol": ":/symbols/vpcs_guest.svg",
    "template_id": "d36b7712-e5e2-4fe9-beb6-dd500306f7a4",
    "template_type": "vpcs"
}

template.deleted

A template has been deleted.

{
    "base_script_file": "vpcs_base_config.txt",
    "builtin": false,
    "category": "guest",
    "compute_id": "local",
    "console_auto_start": false,
    "console_type": "telnet",
    "default_name_format": "PC{0}",
    "name": "VPCS_TEST",
    "symbol": ":/symbols/vpcs_guest.svg",
    "template_id": "cb93aab1-aeab-4e9a-bcb6-0886a3e25bf3",
    "template_type": "vpcs"
}

log.error

Sends an error

{
    "message": "Permission denied on /tmp"
}

log.warning

Sends a warning

{
    "message": "Warning ASA 8 is not officialy supported by GNS3"
}

log.info

Sends an information

{
    "message": "Image uploaded"
}