HTTP Data Collector
The HTTP Data Collector provides a flexible way for external devices, sensors, scripts, and applications to send data directly to Machinechat JEDI using simple REST API calls. This makes it ideal for integrating custom data sources or building your own IoT applications.
Features and Benefits
-
Simple API: Send data using standard HTTP methods (like POST) with a well-defined JSON format.
-
Customizable: Create multiple HTTP Data Collector instances, each listening on a specific IP address and port.
-
Out-of-the-Box Functionality: A default HTTP Data Collector is pre-configured on port 8100, allowing you to start collecting data quickly.
-
Monitoring: View the list of hosts currently sending data to each HTTP Data Collector instance.
Configuration

-
Navigate to
Settings
->Data Collectors
in the JEDI web interface. -
Click the
ADD COLLECTOR
button to create a new data collector. -
Select
HTTP Listener
as theCollector Type
. -
Configure the Following Fields:
-
Collector Name
: A unique name to identify this collector instance. -
Listen IP
: The IP address on which to listen for incoming data (useful for multi-NIC systems). -
Listen Port
: The TCP/IP port number for the collector. The default is 8100. -
Read/Write Timeout
(seconds):Adjust these values if needed based on your network conditions.
-
-
Click
Save
to create the HTTP Data Collector.
API Endpoint and Data Format
Endpoint: /v1/data/mc Method: POST Content-Type: application/json
JSON Payload Structure
{
"context": {
"target_id": "unique_device_name",
"target_ip": "sender_ip_address"
},
"data": {
"metric_name1": value1,
"metric_name2": value2,
...
}
}
JSON Payload Description
-
context:
- target_id: A unique string identifying the device or data source.
- target_ip: The IP address of the device sending the data.
-
data: An object containing key-value pairs representing the metrics and their values. Supported value types: numbers, booleans, and strings.
Example: Sending Data with Python
import requests
import json
url = 'http://<jedi_ip>:8100/v1/data/mc' # Replace <jedi_ip> with JEDI's IP address
payload = {
"context": {
"target_id": "system_metrics",
"target_ip": "localhost"
},
"data": {
"cpu_usage": 92,
"memory_usage": True,
"disk_usage": "disk string"
}
}
headers = {'Content-Type': 'application/json'}
response = requests.post(url, data=json.dumps(payload), headers=headers)
if response.status_code == 200:
print('Data sent successfully')
else:
print('Error sending data:', response.text)
Start collecting your custom data with the HTTP Data Collector today!
Need help? Contact our support team: support@machinechat.io