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:
    syslogRfc5424: 10485760
    udpServer:
      port: 514
      serverName: syslog.example.com

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: syslog
  namespace: documentation
spec:
  siteLocal: {}
  syslog:
    syslogRfc5424: 10485760
    udpServer:
      port: 514
      serverName: syslog.example.com
systemMetadata:
  creationTimestamp: "2021-03-31T08:29:16.260541600Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 6cc1907c-d524-40af-bbe7-5093710bc03b

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"syslog","namespace":"documentation"},"spec":{"syslog":{"udpServer":{"serverName":"syslog.example.com","port":514},"syslogRfc5424":10485760},"siteLocal":{}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build318584715_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: 769
Content-Type: application/json
Date: Wed, 31 Mar 2021 08:29:16 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "syslog",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "6cc1907c-d524-40af-bbe7-5093710bc03b",
    "creation_timestamp": "2021-03-31T08:29:16.260541600Z",
    "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_rfc5424": 10485760
    },
    "site_local": {

    }
  }
}