Log Messages into splunk

Not applicable

Hi Team,

I am working on Log messages into Splunk using Apigee. In that I am using log over Http with service callout policy.

Initially I have created one token using Http Event collector in splunk and I have created one proxy in Apigee.

I have added service callout policy and wrote the following code with generated token in splunk.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="Splunk-service">
<DisplayName>Splunk-service</DisplayName>
<Properties/>
<Request clearPayload="true" variable="myRequest">
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<Set>
<Headers>
<Header name="Authorization">Splunk 435A5164-9CCF-48F5-8EB3-ED06F80C0C30</Header>
</Headers>
<Payload contentType="application/json" variablePrefix="@" variableSuffix="#">
{"event":{"hello":"world"}}
</Payload>
<Path>services/collector/event</Path>
<Verb>POST</Verb>
</Set>
</Request>
<Response>calloutResponse</Response>
<HTTPTargetConnection>
<Properties/>
<URL>http://l192.168.56.1:8088/</URL>
</HTTPTargetConnection>
</ServiceCallout>

When am trying to see the logs of this proxy in splunk it is showing error like "Execution of ServiceCallout Log-to-Splunk failed. Reason: timeout occurred in Log-to-Splunk"

.

But in postman with the same url it shows logs in splunk.

Can any one suggest me where am wrong.

Thanks in Advance.


0 7 628
7 REPLIES 7

Looks like there is an incorrect character before 192?

<URL>http://l192.168.56.1:8088/</URL>

Hi @A.Anu Manasa

Can you check your Target URL ?

@Sean Davis I tried with http://192.168.56.1:8088/ even though it is showing 500 internal error.

HI @A.Anu Manasa - is there a firewall or something from Apigee to the URL you are trying to access ? Probably your machine has access but Apigee does not. Can you please confirm if they dont have any connectivity issues ?

Hi Sai Saran,

Could you please tell me how can we know the firewall issues in Apigee?

HI @VENKATA LAKSHMI KONDAPALLI - Please check if the URL you are trying to access (192.168.56.1) is accessible from Apigee Edge. Your network team can check that for you. Are you using the Cloud version or Private Cloud ?

Hi @A.Anu Manasa,

Please check the connectivity from Message Processors

telnet 192.168.56.1 8088

Also, I would suggest you to use Message Logging Polcy instead of Service call Out policy.

Thanks and Regards,

Gaurav Bhandari