otelendpoint add

Adds an Open Telemetry end point for data collection.

Syntax

CLI
maprcli otelendpoint add

                 -name end point name

                 -url http[s]://hostname

                [ -port port ]

                [ -key Base64 encoded key ]

                [ -keyfile key file path ]

                [ -cert Base64 encoded certificate ]

                [ -certfile certificate file path ]

                [ -customopts json formatted custom options ]

                [ -customoptsfile path to json formatted custom options ]

                [ -cluster cluster_name ]
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/otelendpoint/add?<parameters> 

Parameters

Parameter

Description

name

Name of the end point.

url The server from which to collect the data.
port (optional) The server port if not already specified in the url field.
key (conditionally required) The client key used by the collector that is acting as the client with the server.
NOTE
Required only for secure communication between the collector and the server.
keyfile (conditionally required) Pass the client key in a file instead of directly on the command line.
NOTE
Required only for secure communication between the collector and the server.
cert (conditionally required) The client certificate used by the collector that is acting as the client with the server.
NOTE
Required only for secure communication between the collector and the server.
certfile (conditionally required) Pass the client certificate in a file instead of directly on the command line.
NOTE
Required only for secure communication between the collector and the server.
customopts (optional) Custom options for metric collection. At present, the custom options are:
  • exportlogs: Set to true (by default) to export logs for collection.
  • exportmetrics: Set to true (by default) to export metrics for collection.
customoptsfile (optional) Pass the custom options in a file instead of directly on the command line.
cluster (optional) The cluster on which to add the end point. By default, this is the cluster on which this command is run.

Example

Add an attacks endpoint to collect metrics from the server http://starrynova.com on port 16684 with a custom certificate and key:

CLI
maprcli otelendpoint add -name attacks -url http://starrynova.com:16684 -certfile /root/cfssl/cert.pem  -keyfile /root/cfssl/cert-key.pem -json                                                                                               {
        "timestamp":1702557061912,
        "timeofday":"2023-12-14 04:31:01.912 GMT-0800 AM",
        "status":"OK",
        "total":0,
        "data":[

        ],
        "messages":[
                "end point added successfully"
        ]
}
REST
https://abc.sj.us:8443/rest/otelendpoint/add?name=attacks&url=http://starrynova.com:16684&certfile=/root/cfssl/cert.pem&keyfile=/root/cfssl/cert-key.pem