This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.
rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
#!/bin/sh | |
# | |
# chkconfig: 35 99 99 | |
# description: Node.js /home/nodejs/sample/app.js | |
# | |
. /etc/rc.d/init.d/functions | |
USER="nodejs" |
import javax.xml.XMLConstants | |
import javax.xml.transform.stream.StreamSource | |
import javax.xml.validation.SchemaFactory | |
class jasonXsdValdation { | |
static def xml = """ | |
<?xml version="1.0" encoding="UTF-8"?> | |
<jason> |
build | |
Builds a job, and optionally waits until its completion. | |
cancel-quiet-down | |
Cancel the effect of the "quiet-down" command. | |
clear-queue | |
Clears the build queue | |
connect-node | |
Reconnect to a node | |
copy-job | |
Copies a job. |
<?xml version="1.0" encoding="UTF-8"?> | |
<mule xmlns="http://www.mulesoft.org/schema/mule/core" | |
version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd"> | |
<flow name="@service.op.name.capitalcase@JMSHandler" doc:name="@service.op.name.capitalcase@JMSHandler"> | |
<logger message="#[message.payload]" level="WARN"category="@service.op.name.lowercase@.JMSHandler.Response" doc:name ="Log@service.op.name.lowercase@ Service Response" /> | |
//rest of actual flow content with placeholders |
package com.sixtree.xs2xml; | |
import java.io.File; | |
import javax.xml.namespace.QName; | |
import javax.xml.transform.TransformerConfigurationException; | |
import javax.xml.transform.stream.StreamResult; | |
import jlibs.xml.Namespaces; | |
import jlibs.xml.sax.XMLDocument; |
import org.mule.api.transport.OutputHandler | |
// store the current payload at the time the script is invoked | |
// (i.e. the back-end response stream/iterator) | |
def itr = payload; | |
// return a Groovy closure / lambda | |
return {evt, out -> | |
// define a stream XML builder object |
//import the GroovyMap | |
import au.com.sixtree.esb.mapper.GroovyMap | |
//We have a customized version of DOMCategory helper class, this provides us with xpath like features to access elements | |
//The default version involves a slightly different syntax. | |
import au.com.sixtree.java.esb.mapper.DOMCategory | |
//GroovyMap's toXMLDom() method takes input as the root/documentElement of the XML tree, type @Element | |
//very similar to accessing the root element in Java - payload.getDocumentElement() | |
return GroovyMap.toXmlDom(payload.documentElement) { | |
//inputs is a list of input arguments |
// no need to use builder here, just raw Groovy map syntax | |
//get DOMCategory to get access to GPATH style operations like getNode getNodeAt etc. | |
import au.com.sixtree.java.esb.mapper.DOMCategory; | |
//declare a java.util.Map to hold results | |
def result = [:] | |
//get input root element | |
def _in = payload.documentElement | |
use(DOMCategory) { |
/* | |
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
* The software in this package is published under the terms of the CPAL v1.0 | |
* license, a copy of which has been included with this distribution in the | |
* LICENSE.txt file. | |
*/ | |
package org.mule.api.transport; | |
import org.mule.api.MuleEvent; |