elasticsearch-sink-plugin
is an ElasticSearch egress plugin for MTConnect Agents. The plugin streams data from the agent to a designated ElasticSearch v7.9+ server.
Please visit the Elasticsearch Platform website for setup info.
Devices = _metaagent_.xml
Port = 7979
Adapters
{
Mazak
{
Host = demo.metalogi.io
Port = 7879
}
}
Sinks
{
ELASTICSEARCH {
#
# ElasticSearch server info
#
ElasticSearchUrl = http://localhost:9200
#
# Additional optional connection info
#ElasticSearchUser = <your user id>
#ElasticSearchPassword = <your user password>
# indexName = <index name associated with the data, default is mtconnect>
ElasticSearchIndexName = mtconnect
# batchSize = <# of records to be processed in a batch, default is 100>
batchSize = 200
# in demo mode, each data may only get updated every 20 seconds
#licenseKey = <your license key - default is demo mode if not provided>
# override logger config
logger_config {
output = file elasticsearch-sink.log
level = info
}
}
}
ElasticSearchUrl
: Elasticsearch API service's URLElasticSearchUser/ElasticSearchPassword
: Elasticsearch service login credential.ElasticSearchIndexName
: The index name for the bulk insert data, default is mtconnect
batchSize
: Specify # of records for each bulk insert, default is 100.
C:\Program Files\MetaAgent\examples\elasticsearch-sink-plugin>agent run
MTConnect Agent Version 2.2.0.592 - built on Mon Oct 9 22:38:46 2023
[2023-10-29 04:48:58.978662] [0x00000e00] [trace] Found file 'agent.cfg' in path "C:\\Program Files\\MetaAgent\\examples\\elasticsearch-sink-plugin"
[2023-10-29 04:48:58.978662] [0x00000e00] [info] Loading configuration from: "C:\\Program Files\\MetaAgent\\examples\\elasticsearch-sink-plugin\\agent.cfg"
Loading configuration from:"C:\\Program Files\\MetaAgent\\examples\\elasticsearch-sink-plugin\\agent.cfg"