VMware LogInsight Java API

A application used as an example on how to set up pushing its components to the Central Repository.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования VMware Контейнер Виртуализация
Группа

Группа

com.vmware.loginsightapi
Идентификатор

Идентификатор

loginsight-java-api
Последняя версия

Последняя версия

0.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

VMware LogInsight Java API
A application used as an example on how to set up pushing its components to the Central Repository.
Ссылка на сайт

Ссылка на сайт

https://github.com/vmware/loginsight-java-api
Система контроля версий

Система контроля версий

https://github.com/vmware/loginsight-java-api

Скачать loginsight-java-api

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.vmware.loginsightapi/loginsight-java-api/ -->
<dependency>
    <groupId>com.vmware.loginsightapi</groupId>
    <artifactId>loginsight-java-api</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.vmware.loginsightapi/loginsight-java-api/
implementation 'com.vmware.loginsightapi:loginsight-java-api:0.1.1'
// https://jarcasting.com/artifacts/com.vmware.loginsightapi/loginsight-java-api/
implementation ("com.vmware.loginsightapi:loginsight-java-api:0.1.1")
'com.vmware.loginsightapi:loginsight-java-api:jar:0.1.1'
<dependency org="com.vmware.loginsightapi" name="loginsight-java-api" rev="0.1.1">
  <artifact name="loginsight-java-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.vmware.loginsightapi', module='loginsight-java-api', version='0.1.1')
)
libraryDependencies += "com.vmware.loginsightapi" % "loginsight-java-api" % "0.1.1"
[com.vmware.loginsightapi/loginsight-java-api "0.1.1"]

Зависимости

compile (20)

Идентификатор библиотеки Тип Версия
org.apache.logging.log4j : log4j-api jar 2.1
org.apache.logging.log4j : log4j-core jar 2.1
org.apache.logging.log4j : log4j-slf4j-impl jar 2.1
org.apache.commons : commons-lang3 jar 3.0
commons-beanutils : commons-beanutils jar 1.9.2
org.apache.commons : commons-configuration2 jar 2.0
org.codehaus.groovy.modules.http-builder : http-builder jar 0.7.1
org.apache.commons : commons-pool2 jar 2.0
javax.validation : validation-api jar 1.1.0.Final
org.codehaus.groovy : groovy-all jar 2.4.5
org.apache.httpcomponents : httpasyncclient jar 4.1-beta1
org.apache.httpcomponents : httpclient jar 4.5
org.apache.httpcomponents : fluent-hc jar 4.5.2
commons-io : commons-io jar 2.5
com.fasterxml.jackson.core : jackson-core jar 2.7.5
com.fasterxml.jackson.core : jackson-databind jar 2.7.5
com.fasterxml.jackson.core : jackson-annotations jar 2.7.5
joda-time : joda-time jar 2.3
com.fasterxml.jackson.datatype : jackson-datatype-joda jar 2.7.5
net.sourceforge.jtds : jtds jar 1.3.1

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19
org.spockframework : spock-spring jar 1.0-groovy-2.4

Модули Проекта

Данный проект не имеет модулей.

VMware has ended active development of this project, this repository will no longer be updated.

Maven Central Gitter Javadocs Build Status Coverage Status [//]: javadoc

loginsight-java-api

VMware vRealize LogInsight provides a REST API. For more information on REST API, refer to Steve Flanders blog post Log Insight 3.3: Query API

We are providing an easy to use java wrapper to interact with VMware vRealize LogInsight. This loginsight-java-api currently supports

  • message queries
  • aggregate queries and
  • ingesion

Join us @gitter to discuss on any issues on using this API.

Usage

Getting the jar

Functionality of this package is contained in Java package com.vmware.loginsightapi. To use the package, you need to use following Maven dependency:

<dependency>
    <groupId>com.vmware.loginsightapi</groupId>
    <artifactId>loginsight-java-api</artifactId>
    <version>0.1.1</version>
</dependency>

In case of gradle project please use the following

compile group: 'com.vmware.loginsightapi', name: 'loginsight-java-api', version: '0.1.1'

API

####1. Connecting to LogInsight

LogInsightClient client = new LogInsightClient("host-name", "username", "password");

####2. Ingestion of messages to LogInsight

IngestionRequest request = new IngestionRequestBuilder()
	.message(new Message("message line 1"))
	.message(new MessageBuilder("message line 2")
	.field("field1", "content 1").build())
	.build();
CompletableFuture<IngestionResponse> responseFuture = client.ingest(request);

####3. Event Queries

MessageQuery mqb = (MessageQuery) new MessageQuery()
	.addConstraint("field_1", FieldConstraint.Operator.EQ, "value1")
	.addContentPackField("test");
CompletableFuture<MessageQueryResponse> responseFuture = client.messageQuery(mqb.toUrlString());

####4. Aggregation Queries

Default aggregation function is COUNT as defined by LogInsight API.

AggregateQuery aqb = (AggregateQuery) new AggregateQuery()
	.addConstraint("field_1", FieldConstraint.Operator.EQ,"value1")
	.addContentPackField("test");
CompletableFuture<AggregateQueryResponse> responseFuture = client.aggregateQuery(aqb.toUrlString());

Build from source

Prerequisites

  • Java 8 JDK installed and set your JAVA_HOME to home of Java8 JDK
  • vRealize LogInsight 3.3 onwards

Build & Run

$ ./gradlew clean build

Contributing

The loginsight-java-api project team welcomes contributions from the community. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will update the issue when you open a Pull Request. For any questions about the CLA process, please refer to our FAQ. For more detailed information, refer to CONTRIBUTING.md.

License

Copyright © 2016 VMware, Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Some files may be comprised of various open source software components, each of which has its own license that is located in the source code of the respective component.

com.vmware.loginsightapi

VMware

Версии библиотеки

Версия
0.1.1
0.1.0