# RawSyslogForwarder

## RawSyslogForwarder - Create

Creates a new Raw Syslog Forwarder

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder
```

### Parameters

| Field                      |   Label in UI |      Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------- | ------------: | --------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| device\_config             |             - |   \[json] | Json containing information of the devices. LogPoint collects and forwards the raw syslog messages from the devices. Either can be absent or following parameters must be provided to define device\_config. device\_group : Id of devicegroup. Value should be an empty string when no device\_group is present for the devices. Mandatory field. include\_all\_devices : Can be either true or false . devices should not be present in the request when include\_all\_devices is true. Optional field devices : list of devices. devices should be present and non empty when include\_all\_devices is either not present or false. Value should be present when device\_group is empty. . Optional Field |
| pattern                    |       Pattern |    String | Provide the regex Pattern. Only the logs matching the specified pattern are forwarded. For example: '\[ 0-9 ]+:' forwards log only if any digit is present in logs. Optional Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| remote\_syslog\_collectors | Remote Target | \[String] | ID of the Targets where the logs are to be forwarded. Mandatory Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

### Request Example

```json
{
    "data": {
        "device_config": [
            {
                "device_group": "60a4a72c2d76c9046d54a3b6",
                "include_all_devices": true
            },
            {
                "device_group": "40a4a72d2d76c9045d54a3b5",
                "devices": [
                    "2344a72d2d76c9045d54a3c6",
                    "5674a72d2d76c9045d54a3d7"
                ]
            }
        ],
        "pattern": "[ 0-9 ]+",
        "remote_syslog_collectors": [
            "60a4a72c2d76c9046d54a3b6",
            "31a4a72c2e66c9046d54a3c2"
        ]
    }
}
```

### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## RawSyslogForwarder - CreateTarget

Creates a new Target

**POST**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/Target
```

### Parameters

| Field       | Label in UI |   Type | Description                                                                                                                                              |
| ----------- | ----------: | -----: | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enable\_udp |    Protocol | String | Accepts either "on" or "off" values only. "on" implies UDP while "off" implies TCP being selected as protocol for sending syslogmessage. Mandatory Field |
| ip          |          IP | String | Ip address or hostname of the target device. Mandatory Field                                                                                             |
| name        |        Name | String | Name of the target. Mandatory Field                                                                                                                      |
| port        |        Port |    int | Port number for the input port of the target. Mandatory Field                                                                                            |

### Request Example

```json
{
    "data": {
        "enable_udp": "on",
        "ip": "10.45.6.15",
        "name": "target_1",
        "port": 514
    }
}
```

### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## RawSyslogForwarder - Edit

Updates the existing configuration of the Raw Syslog Forwarder with the given id.

**PUT**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/{id}
```

### Parameters

| Field                      |   Label in UI |      Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------- | ------------: | --------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| device\_config             |             - |   \[json] | Json containing information of the devices. LogPoint collects and forwards the raw syslog messages from the devices. Either can be absent or following parameters must be provided to define device\_config. device\_group : Id of devicegroup. Value should be an empty string when no device\_group is present for the devices. Mandatory field. include\_all\_devices : Can be either true or false . devices should not be present in the request when include\_all\_devices is true. Optional field devices : list of devices. devices should be present and non empty when include\_all\_devices is either not present or false. Value should be present when device\_group is empty. . Optional Field |
| id                         |             - |    String | Existing Raw Syslog Forwarder id. Obtain the value of the required Raw Syslog Forwarder id using RawSyslogForwarder - List API. Mandatory Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| pattern                    |       Pattern |    String | Pattern of logs to be collected and forwarded. Optional Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| remote\_syslog\_collectors | Remote Target | \[String] | ID of the Targets where the logs are to be forwarded. Mandatory Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

### Request Example

```json
{
    "data": {
        "device_config": [
            {
                "device_group": "60a4a72c2d76c9046d54a3b6",
                "include_all_devices": true
            },
            {
                "device_group": "40a4a72d2d76c9045d54a3b5",
                "devices": [
                    "2344a72d2d76c9045d54a3c6",
                    "5674a72d2d76c9045d54a3d7"
                ]
            }
        ],
        "pattern": "[ 0-9 ]+",
        "remote_syslog_collectors": [
            "60a4a72c2d76c9046d54a3b6",
            "31a4a72c2e66c9046d54a3c2"
        ]
    }
}
```

### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

***

## RawSyslogForwarder - EditTarget

Edits the target settings with the given id

**PUT**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/Target/{id}
```

### Parameters

| Field       | Label in UI |   Type | Description                                                                                                                                              |
| ----------- | ----------: | -----: | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enable\_udp |    Protocol | String | Accepts either "on" or "off" values only. "on" implies UDP while "off" implies TCP being selected as protocol for sending syslogmessage. Mandatory Field |
| id          |           - | String | Existing Target id. Obtain the value of the required Target id using Target - ListTarget API. Mandatory Field                                            |
| ip          |          IP | String | Ip address or hostname of the target device. Mandatory Field                                                                                             |
| name        |        Name | String | Name of the target. Mandatory Field                                                                                                                      |
| port        |        Port |    int | Port number for the input port of the target. Mandatory Field                                                                                            |

### Request Example

```json
{
    "data": {
        "enable_udp": "on",
        "ip": "10.45.6.15",
        "name": "target_1",
        "port": 514
    }
}
```

### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## RawSyslogForwarder - Get

Fetches the Raw Syslog Forwarder with the given id.

**GET**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/{id}
```

### Parameters

| Field | Label in UI |   Type | Description                                  |
| ----- | ----------: | -----: | -------------------------------------------- |
| id    |           - | String | The id of the Raw Syslog Forwarder to fetch. |

### Success Response

```json
{
    "device_config": [
        {
            "device_group": "60a4a72c2d76c9046d54a3b6",
            "include_all_devices": true
        },
        {
            "device_group": "40a4a72d2d76c9045d54a3b5",
            "devices": [
                "2344a72d2d76c9045d54a3c6",
                "5674a72d2d76c9045d54a3d7"
            ]
        }
    ],
    "id": "5c32c078f419a4aa901be3dc",
    "pattern": "[ 0-9 ]+",
    "remote_syslog_collectors": [
        "60a4a72c2d76c9046d54a3b6, 31a4a72c2e66c9046d54a3c2"
    ],
    "tid": ""
}
```

## RawSyslogForwarder - GetTarget

Fetches the target with the given id

**GET**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/Target/{id}
```

### Parameters

| Field | Label in UI |   Type | Description                                          |
| ----- | ----------: | -----: | ---------------------------------------------------- |
| id    |           - | String | Id of the target whose information you want to fetch |

### Success Response

```json
{
    "enable_udp": "on",
    "id": "5c32c078f419a4aa901be3dc",
    "ip": "10.45.3.91",
    "name": "target_1",
    "port": "514",
    "tid": ""
}
```

## RawSyslogForwarder - List

Lists all available Raw Syslog Forwarder.

**GET**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder
```

### Success Response

```json
[
    {
        "device_config": [
            {
                "device_group": "60a4a72c2d76c9046d54a3b6",
                "include_all_devices": true
            },
            {
                "device_group": "40a4a72d2d76c9045d54a3b5",
                "devices": [
                    "2344a72d2d76c9045d54a3c6",
                    "5674a72d2d76c9045d54a3d7"
                ]
            }
        ],
        "id": "5c32c078f419a4aa901be3dc",
        "pattern": "[ 0-9 ]+",
        "remote_syslog_collectors": [
            "60a4a72c2d76c9046d54a3b6, 31a4a72c2e66c9046d54a3c2"
        ],
        "tid": ""
    }
]
```

## RawSyslogForwarder - ListTarget

Lists all Targets in the Fabric-enabled Logpoint

**GET**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/Target
```

### Success Response

```json
[
    {
        "enable_udp": "on",
        "id": "5c32c078f419a4aa901be3dc",
        "ip": "10.45.3.91",
        "name": "target_1",
        "port": "514",
        "tid": ""
    }
]
```

## RawSyslogForwarder - Trash

Delete the Raw Syslog Forwarder with given id.

**DELETE**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/{id}
```

### Parameters

| Field | Label in UI |   Type | Description                                                                                                                                     |
| ----- | ----------: | -----: | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| id    |           - | String | Existing Raw Syslog Forwarder id. Obtain the value of the required Raw Syslog Forwarder id using RawSyslogForwarder - List API. Mandatory Field |

### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```

## RawSyslogForwarder - TrashTarget

Deletes the Target with the given id

**DELETE**

```
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/RawSyslogForwarder/Target/{id}
```

### Parameters

| Field | Label in UI |   Type | Description                                                                                                   |
| ----- | ----------: | -----: | ------------------------------------------------------------------------------------------------------------- |
| id    |           - | String | Existing Target id. Obtain the value of the required Target id using Target - ListTarget API. Mandatory Field |

### Success Response

```json
{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}
```
