This module provides features in order to ingest data in IKATS.
The application is deployed on a Tommee server and runs independantly of IKATS datamodel.
It can be reached by two means:
The API is available from the URL base: http://host:port/ikats-ingestion/api
where host is the IP of the application server host.
Services available from HTTP API are:
Request:
/sessionshttp://host:port/ikats-ingestion/api/sessionsPOSTNominal response:
201<ID> from the value.http://host:port/ikats-ingestion/api/sessions/<ID>Error response:
header code HTTP: error code 500|400|...
body: HTML content for additional error information.
See also how to submit HTTP requests
The JSON data to be sent shall contain the following properties:
dataset The name of the future dataset into IKATS database
description A description of that dataset for the end user
rootPath The root path of the dataset on the import server where files are located
/IKATSDATA)pathPattern Regex pattern rules for defining tags and metric of dataset:
rootPath, and is not included in the pattern(?<metric>.*), it defines mandatory information (for OpenTSDB )(?<tagname>.*)\ needs to be doubled \\):
\\/(?<equipement>\\w*)\\/(?<metric>.*?)_(?<validity>bad|good)\\.csv
funcIdPattern Pattern configuring how is generated the Functional Identifier. This substitution pattern defines sections ${metric} or ${<tagname>} refering to pathPattern groups, and replaced by respective group values matched by pathPattern. It follows Apache Commons Lang StrSubstitutor variable format, with any <tagname> or metric as variables names.
Examples:
${equipement}_${metric}_${validity}
importer Fully Qualified Name of the java importer used to transfer the Time-Serie data to the IKATS dedicated database.
{
"dataset": "Dataset_name",
"description": "Dataset exemple",
"rootPath": "data_dataset_example",
"pathPattern": "\\/(?<equipement>\\w*)\\/(?<metric>.*?)_(?<validity>bad|good)\\.csv",
"funcIdPattern": "${equipement}_${metric}_${validity}",
"serializer": "fr.cs.ikats.datamanager.client.opentsdb.importer.CommonDataJsonIzer",
"importer": "fr.cs.ikats.ingestion.process.opentsdb.OpenTsdbImportTaskFactory"
}
/sessions/{id}/restarthttp://host:port/ikats-ingestion/api/sessions/{id}/restart
{id} is the id of the session.PUTSee also how to submit HTTP requests
Warning: Do not use it for a large dataset, the current output is the full data of the sessions !
/sessionshttp://host:port/ikats-ingestion/api/sessionsGETSee also how to submit HTTP requests
Request:
/sessions/<ID>http://host:port/ikats-ingestion/api/sessions/xGETResponse: the session JSON content
See also how to submit HTTP requests
Request:
/sessions/<ID>/statshttp://host:port/ikats-ingestion/api/sessions/x/statsGETResponse: the session statistics JSON content
See also how to submit HTTP requests
You can only run one ingestion at once! There are 2 workarounds:
Firstly make sure that Tomee server is installed and started.
The services are provided by the application ikats-ingestion running on the Tomee server.
You can manage the services from the Tomee admin page, at line ikats-ingestion as described in Check the server status
Use the command http installed by httpie
For a body with JSON content: edit the JSON content in a file req.json
Launch the http command and read the response header and body
Example:
http POST http://host:port/ikats-ingestion/api/sessions < req.json
HTTP/1.1 201
Content-Length: 0
Date: Fri, 12 May 2018 07:02:50 GMT
Location: http://host:port/ikats-ingestion/api/sessions/6
Server: Apache TomEE
<HTTP URL>: for a specific body or a verb different from GET, this does not yet work, and you have to go to step 2PUT|POST|DELETE|GETContent-Type: application/json<JSON content>Submit
* Check the Response Header from the submitted requests: visible from the Header.Check that the server is started: browse the http://host:port: TomEE welcome page should be available.
For further informations, select Server status from the welcome page, and enter the well-known admin login/password to reach admin page:
Follow the link Lister les applications
The ingesting tool services should be visible at line having the path /ikats-ingestion
To start the application server you have to run from the server host
cd /home/ikats/ingestion # will be the directory where the ingestion database file will be stored
cd apache-tomee-plume-7.0.3
bin/./catalina.sh jpda start # to tell the server to start with JPDA remote capabilities activated
To stop the server from the server host use:
/home/ikats/ingestion/apache-tomee-plume-7.0.3/bin/./shutdown.sh
Content type
Image
Digest
Size
311.3 MB
Last updated
almost 8 years ago
docker pull ikats/ingestion