FTP
Direction: MO
A Cloudloop Data FTP Destination allows for the uploading of any Cloudloop messages to a user provided FTP server, either as a payload or in json Lingo format.
- Host - The FTP host url including port; e.g. ftp.cloudloop.com:8080
- Username - FTP account username that Cloudloop will use to log in to the server. It's recommended that a separate account is used with only required permissions
- Password - FTP account password
- Directory - Path to the directory on the FTP server where Cloudloop will upload the data; e.g. iot/data/upload. Ensure the provided FTP user has permissions to write to the location
- Prefix - Optional prefix to add to the beginning of file names; e.g. iot-
- Extension - Optional extension to add to filenames; e.g. data, ignored when uploading Lingo json which will always have the .json extension
- Upload Mode - What files should be uploaded to the FTP - see Upload Modes for available options.
- File Naming - How filenames will be determined
- ID - The ID of the Lingo message will be used
- Source - Replicates the file structure used at the file source. Only use this option when utilising a RockRemote with the IoT file upload functionality.
Example - Upload Mode Lingo
With the Lingo Upload mode selected, 'iot/upload/' provided as the directory and a prefix of 'iot-'. Lingo will be uploaded to 'iot/upload/iot-1b59a800-60cb-4c08-b6df-8ec5ef988926.json' as below:
{
"id": "1b59a800-60cb-4c08-b6df-8ec5ef988926",
"receivedAt": {
"year": 2023,
"month": 10,
"day": 9,
"hour": 14,
"minute": 52,
"second": 20
},
"identity": {
"accountId": "yJGjpPobLlmOdanVkPWAKYzNMgwVZkrR",
"subscriber": {
"id": "XgwyNPpDmebJLWXmwgEoARqxMdZOVGva",
"type": "SUBSCRIBER_TYPE_SBD",
"description": ""
},
"hardware": {
"id": "joGRxQrXpzkPJEglMOBydwYZbqmDagNA",
"type": "HARDWARE_TYPE_ROCKBLOCK",
"imei": "300234065366010",
"serial": ""
},
"identifier": "300234065366010",
"thingId": "DgXeoxwVPMyrdOBJeEGlqKRJLbajQkzZ"
},
"sbd": {
"imei": "300234065366010",
"cdrReference": "3155570006",
"momsn": 5394,
"mtmsn": 0,
"sessionAt": {
"year": 2023,
"month": 10,
"day": 9,
"hour": 14,
"minute": 52,
"second": 19
},
"status": "SESSION_STATUS_OK",
"location": {
"latitude": 50.84753333333333,
"longitude": -1.1934833333333335,
"cep": 8.0
}
},
"message": "JgBrey0iF+ztEQwAAAQBuEQnBA=="
}
Debugging
All uploads to an FTP destination will return a Pulse with phase ‘SENT_MO’ and a status of either success or failure. Pulses with a fail status will include error meta information that can help identify the issue.
- Connection Failed - Cloudloop was unable to connect to the FTP server, check host details and firewall permissions
- Login Failed - Cloudloop was unable to log in to the FTP server, check username and password
- Upload Failed - Generic upload error, check FTP logs
- Invalid Path - Check FTP directory exists and that prefix and extension do not break any file naming rules
- Policy - Upload attempt was denied for FTP policy reasons
- Request Denied - Upload attempt denied, check permissions
- Security Failed - Security check failed, security configuration