Skip to content

Instantly share code, notes, and snippets.

@sajhak
sajhak / loadbalancer.conf
Created July 9, 2014 10:50
loadbalancer.conf
# Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
#
# WSO2 Inc. licenses this file to you 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
#
# Unless required by applicable law or agreed to in writing,
@sajhak
sajhak / axis2.xml
Created July 9, 2014 10:51
ELB axis2.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you 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
@sajhak
sajhak / carbon.xml
Created July 9, 2014 10:52
Appserver carbon.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
~ Copyright 2005-2011 WSO2, Inc. (http://wso2.com)
~
~ 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
@sajhak
sajhak / axis2.xml
Created July 9, 2014 10:53
Appserver axis2.xml file
<!--
~ Copyright 2005-2011 WSO2, Inc. (http://wso2.com)
~
~ 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
~
~ Unless required by applicable law or agreed to in writing, software
<soapenv:Header>
<urn:AuthenticationInfo>
<urn:userName>userName</urn:userName>
<urn:password>password</urn:password>
</urn:AuthenticationInfo>
</soapenv:Header>
@sajhak
sajhak / request.xml
Last active December 22, 2015 01:29
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header><wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Timestamp wsu:Id="TS-48">
<wsu:Created>2013-08-31T00:27:32Z</wsu:Created>
<wsu:Expires>2013-08-31T00:30:52Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-47">
<wsse:Username>username</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
<script language="js">
var wsse = new Namespace('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd');
var envelope = mc.getEnvelopeXML();
var username = envelope..wsse::Username.toString();
var password = envelope..wsse::Password.toString();
mc.addHeader(false, <urn:AuthenticationInfo><urn:userName>{username}</urn:userName><urn:password>{password}</urn:password></urn:AuthenticationInfo>);
</script>
@sajhak
sajhak / gist:4ca598f7bd7a92f6855e
Last active February 23, 2016 12:52
elk_logs
sajith@sajith:~$ curl '172.17.0.2:9200/carbon/logs/_search?q=*'
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":57,"max_score":1.0,"hits":[{"_index":"carbon","_type":"logs","_id":"AVMOK4E-gAhTurf6j4EJ","_score":1.0,"_source":{"@logstream": "['wso2as-530-application', 'wso2as-530-application.wso2as-530.wso2as-530.domainf40ed568-321a-41ce-86b2-1ccc8c98a9e5']", "application_id": "wso2as-530-application", "tenant_id": "0", "cartridge_alias": "wso2as-530", "cluster_id": "wso2as-530-application.wso2as-530.wso2as-530.domain", "@timestamp": "2016-02-23T12:47:23.455255", "member_id": "wso2as-530-application.wso2as-530.wso2as-530.domainf40ed568-321a-41ce-86b2-1ccc8c98a9e5", "message": "TID: [-1234] [] [2016-02-23 12:46:21,861] WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} - Swap Memory size (MB): 0 of the system is below the recommended minimum size :2047 {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter}\n"}},{"_index":"carbon