ves-io-schema-log_receiver-API-Create

Examples of creating log_receiver

Usecase:

Create syslog log receiver.

Request using vesctl:

vesctl configuration create log_receiver -i log_receiver.yaml

where file logreceiver.yaml has following contents (logreceiver.CreateRequest):

metadata:
  name: syslog
  namespace: documentation
spec:
  siteLocal: {}
  syslog:
    syslogFormat: 512
    udpServer:
      port: 514
      serverName: syslog.example.com

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: syslog
  namespace: documentation
spec:
  siteLocal: {}
  syslog:
    syslogFormat: 512
    udpServer:
      port: 514
      serverName: syslog.example.com
systemMetadata:
  creationTimestamp: "2020-12-16T09:12:30.954699223Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: bece659a-698e-45c9-b3ad-fe5b4b477499

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"syslog","namespace":"documentation"},"spec":{"syslog":{"udpServer":{"serverName":"syslog.example.com","port":514},"syslogFormat":512},"siteLocal":{}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build101377873_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/log_receivers'

curl response:

HTTP/1.1 200 OK
Content-Length: 763
Content-Type: application/json
Date: Wed, 16 Dec 2020 09:12:30 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "syslog",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "bece659a-698e-45c9-b3ad-fe5b4b477499",
    "creation_timestamp": "2020-12-16T09:12:30.954699223Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "syslog": {
      "udp_server": {
        "server_name": "syslog.example.com",
        "port": 514
      },
      "syslog_format": 512
    },
    "site_local": {

    }
  }
}