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"
}

project.created

A project has been created.

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "drawing_grid_size": 25,
    "filename": "Test.gns3",
    "grid_size": 75,
    "name": "Test",
    "path": "/tmp/tmprusds8mt/projects/87d4b692-52b4-4b4c-8828-13666306a68a",
    "project_id": "87d4b692-52b4-4b4c-8828-13666306a68a",
    "scene_height": 1000,
    "scene_width": 2000,
    "show_grid": false,
    "show_interface_labels": false,
    "show_layers": false,
    "snap_to_grid": false,
    "status": "opened",
    "supplier": null,
    "variables": null,
    "zoom": 100
}

project.updated

A project has been updated.

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "drawing_grid_size": 25,
    "filename": "test.gns3",
    "grid_size": 75,
    "name": "test2",
    "path": "/tmp/tmp4p7e6dvr/projects/10010203-0405-0607-0809-0a0b0c0d0e0f",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
    "scene_height": 1000,
    "scene_width": 2000,
    "show_grid": false,
    "show_interface_labels": false,
    "show_layers": false,
    "snap_to_grid": false,
    "status": "opened",
    "supplier": null,
    "variables": [
        {
            "name": "TEST1"
        },
        {
            "name": "TEST2",
            "value": "value1"
        }
    ],
    "zoom": 100
}

project.closed

A project has been closed.

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "drawing_grid_size": 25,
    "filename": "Test.gns3",
    "grid_size": 75,
    "name": "Test",
    "path": "/tmp/tmpkrfbz5gp/projects/79431797-f481-40d8-ba28-f944423a8aaf",
    "project_id": "79431797-f481-40d8-ba28-f944423a8aaf",
    "scene_height": 1000,
    "scene_width": 2000,
    "show_grid": false,
    "show_interface_labels": false,
    "show_layers": false,
    "snap_to_grid": false,
    "status": "closed",
    "supplier": null,
    "variables": null,
    "zoom": 100
}

project.deleted

A project has been deleted.

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "drawing_grid_size": 25,
    "filename": "Test.gns3",
    "grid_size": 75,
    "name": "Test",
    "path": "/tmp/tmpvqf8d5mx/projects/6f01ee8c-5fe7-47a2-95ab-a0f4c0a355f9",
    "project_id": "6f01ee8c-5fe7-47a2-95ab-a0f4c0a355f9",
    "scene_height": 1000,
    "scene_width": 2000,
    "show_grid": false,
    "show_interface_labels": false,
    "show_layers": false,
    "snap_to_grid": false,
    "status": "closed",
    "supplier": null,
    "variables": null,
    "zoom": 100
}

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": "c6ee76a9-3906-4fd1-ad4d-77ecf2168bac",
    "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": "7b448d0f-a756-421d-9c97-8a339e5ec6c2",
    "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": "a12e443e-7e32-432b-a256-0a4587e24bec",
    "template_type": "vpcs"
}

log.error

Sends an error

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

log.warning

Sends a warning

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

log.info

Sends an information

{
    "message": "Image uploaded"
}