org.mule.modules

mule-module-loggly

config-retrieve

Namespacehttp://www.mulesoft.org/schema/mule/loggly
Schema Locationhttp://www.mulesoft.org/schema/mule/loggly/current/mule-loggly.xsd  (View Schema)
Schema Version1.0
Minimum Mule Version3.2

Module Overview

Logger Retrieve Module

CRUD of input and logging devices, retrieve and search previously logged messages from Loggly.

Summary

Configuration
<loggly:config-retrieve>
Configure an instance of this module
Transformers
<loggly:transform-json-to-device>
Transform JSON to Device

<loggly:transform-json-to-devices>
Transform JSON to collection of Devices

<loggly:transform-json-to-facet-result>
Transform JSON to a Facet Search result

<loggly:transform-json-to-input>
Transform JSON to Input

<loggly:transform-json-to-inputs>
Transform JSON to collection of Inputs

<loggly:transform-json-to-result-set>
Transform JSON to Result Set

Message Processors
<loggly:add-current-device>
Add the current machine as a device to an existing input

<loggly:add-current-device-to-syslog514>
Add the current machine with Syslog 514 UDP as a device to an existing input

<loggly:add-device>
Adds a device to an input

<loggly:create-input>
Create an input

<loggly:delete-device>
Deletes a Device from an Input

<loggly:delete-device-by-ip>
Deletes a Device (identified by an IP address) from an Input

<loggly:device>
Get a device by id

<loggly:devices>
Get all the Devices

<loggly:disable-input-discovery>
Disables discovery mode on the device

<loggly:enable-input-discovery>
Puts the Input in discovery mode

<loggly:facet>
Provides faceted results from an account on either date, ip, or input fields.
<loggly:input>
Fetch an input for an account using its id.
<loggly:input-by-name>
Fetch an input for an account using its name.
<loggly:inputs>
Fetch all the inputs associated with the account.
<loggly:remove-device>
Remove Device from Input

<loggly:search>
Searches for a log message.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:loggly="http://www.mulesoft.org/schema/mule/loggly"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/loggly
               http://www.mulesoft.org/schema/mule/loggly/current/mule-loggly.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescriptionJava TypeMIME TypeEncoding
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string password Loggly Password
xs:string subdomain Logging Subdomain
xs:string username Loggly Username

Message Processors

<loggly:add-current-device>

Add the current machine as a device to an existing input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Input ID int */*
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:add-current-device-to-syslog514>

Add the current machine with Syslog 514 UDP as a device to an existing input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Device ID int */*
Returns
Return Type Description
void Input input
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:add-device>

Adds a device to an input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Input ID where to attach the device Integer */*
ip IP Address of the device String */* UTF-8
deviceName Name of the device String */* UTF-8
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:create-input>

Create an input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
inputName Name String */* UTF-8
description Description String */* UTF-8
service Service to use Service */*
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:delete-device>

Deletes a Device from an Input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Device ID to remove int */*
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:delete-device-by-ip>

Deletes a Device (identified by an IP address) from an Input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
ip IP Address of the Device to remove String */* UTF-8
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:device>

Get a device by id

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Device to retrieve int */*
Returns
Return Type Description
Device devices
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:devices>

Get all the Devices

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
Returns
Return Type Description
Collection<Device> devices
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:disable-input-discovery>

Disables discovery mode on the device

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Device ID int */*
Returns
Return Type Description
void Input input
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:enable-input-discovery>

Puts the Input in discovery mode

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Device ID int */*
Returns
Return Type Description
void Input input
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:facet>

Provides faceted results from an account on either date, ip, or input fields. Facets return counts of events over a time range.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
query String to search in logs. String */* UTF-8
facetType Facet type to use. FacetType */*
buckets 50 Optional. Number of buckets the results are split into for a given time range. Defaults to 50. int */*
gap +1HOUR Optional. Set the gap time between buckets. Defaults to +1HOUR String */* UTF-8
from NOW-1HOUR Optional. Start time for the search. Defaults to NOW-1HOUR. String */* UTF-8
until NOW Optional. End time for the search. Defaults to NOW. String */* UTF-8
Returns
Return Type Description
LogglyFacetResult Facet results
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:input>

Fetch an input for an account using its id. Without id

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Id of the input int */*
Returns
Return Type Description
Input Input input
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:input-by-name>

Fetch an input for an account using its name.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
inputName Name of the input String */* UTF-8
Returns
Return Type Description
Input Input input
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:inputs>

Fetch all the inputs associated with the account.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
Returns
Return Type Description
Collection<Input> Input input
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:remove-device>

Remove Device from Input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id Device ID int */*
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

<loggly:search>

Searches for a log message.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
query String to search in logs. String */* UTF-8
rows 10 Optional. Number of rows returned by search. Defaults to 10, maximum of 2000. int */*
start 0 Optional. Offset for starting row. Defaults to 0. int */*
from NOW-24HOURS Optional. Start time for the search. Defaults to NOW-24HOURS. String */* UTF-8
until NOW Optional. End time for the search. Defaults to NOW. String */* UTF-8
order ASC Optional. Direction of results returned, either 'asc' or 'desc'. Defaults to 'desc'. Order */*
Returns
Return Type Description
LogglyResultSet Search results
Exception Payloads
Payload ClassDescription
Exception error while doing the request and receiving the response

Message Sources

Transformers

<loggly:transform-json-to-device>

Transform JSON to Device

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
json JSON string to transform String */* UTF-8
Returns
Return Type Description
Device A LogglyFacetResult
Exception Payloads
Payload ClassDescription
IOException if the conversion fails

<loggly:transform-json-to-devices>

Transform JSON to collection of Devices

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
json JSON string to transform String */* UTF-8
Returns
Return Type Description
Collection<Device> A Collection
Exception Payloads
Payload ClassDescription
IOException if the conversion fails

<loggly:transform-json-to-facet-result>

Transform JSON to a Facet Search result

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
json JSON string to transform String */* UTF-8
Returns
Return Type Description
LogglyFacetResult A LogglyFacetResult
Exception Payloads
Payload ClassDescription
IOException if the conversion fails

<loggly:transform-json-to-input>

Transform JSON to Input

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
json JSON string to transform String */* UTF-8
Returns
Return Type Description
Input A LogglyFacetResult
Exception Payloads
Payload ClassDescription
IOException if the conversion fails

<loggly:transform-json-to-inputs>

Transform JSON to collection of Inputs

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
json JSON string to transform String */* UTF-8
Returns
Return Type Description
Collection<Input> A java.util.Collection
Exception Payloads
Payload ClassDescription
IOException if the conversion fails

<loggly:transform-json-to-result-set>

Transform JSON to Result Set

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
json JSON string to transform String */* UTF-8
Returns
Return Type Description
LogglyResultSet A LogglyResultSet object
Exception Payloads
Payload ClassDescription
IOException if the conversion fails