Log messages into Splunk

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.

<ServiceCallout name="Splunk-service">
  <DisplayName>Splunk-service</DisplayName>
  <Properties/>
  <Request clearPayload="true" variable="myRequest">
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <Set>
      <Headers>
        <Header name="Authorization">435A5164-9CCF-48F5-8EB3-ED06F80C0C30</Header>
      </Headers>
      <Payload contentType="application/json" variablePrefix="@" variableSuffix="#">
        {"event":"Logged from EDGE"}
      </Payload>
      <Path>Sample</Path>
      <Verb>POST</Verb>
    </Set>
  </Request>
  <Response>calloutResponse</Response>
  <HTTPTargetConnection>
    <Properties/>
    <URL>https://localhost:8088/</URL>
  </HTTPTargetConnection>
</ServiceCallout>

When am trying to see the logs of this proxy in Splunk, it is showing an error like "no results to be found."

Can any one suggest me where I am wrong.

Thanks in Advance.

Solved Solved
1 8 1,374
1 ACCEPTED SOLUTION

Your service callout is going to https://localhost:8088/Sample .. is that correct?

View solution in original post

8 REPLIES 8

Your service callout is going to https://localhost:8088/Sample .. is that correct?

Hi Carlos,

Thank you for respond. Yes https://localhost:8088/Sample.

if you try to push to that from the MP itself it works as expected?

Hi Carlos, I have used Postman also but I got the error response.

Will you suggest me for how can I resolve this error?

Going to need more info on how you have Edge installed and more. Is everything running local on your machine? What was the response when you called the splunk endpoint using postman?

I am getting could not get any response error in postman. I am attaching the screen shot which I got in postman.splunk-postman.png

It looks like splunk isn't listening on that port then. I'm not much of a splunk person. Can you verify it's set up and configured as you expect?

Okay Carlos. Thanks for your support till.