Keerthi P
Keerthi P

Reputation: 1

How to configure logstash to make an request to APIGEE analytics API?

I am very new to ELK stack and am trying to hit APIGEE analytics REST API, which is in the form of a URL. The response from the URL would be a JSON file. What is the best approach to go ahead with the implementation?

Upvotes: 0

Views: 954

Answers (1)

Guy Hagemans
Guy Hagemans

Reputation: 510

I hope the question is still valid. If I understand it correctly you want to send logging data to an ELK stack. So why not send it instead of retrieving it?

Below is an example of how this policy works on the apigee platform. You need to add it to any API proxy and preferably at the PostClientFlow:

....
</PostFlow>
<PostClientFlow>
    <Response>
        <Step>
            <Name>Message-Logging-Policy1</Name>
        </Step>
    </Response>
</PostClientFlow>

Below the policy.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging  async="false" continueOnError="false" enabled="true"      name="Message-Logging-1">
<DisplayName>Message Logging</DisplayName>
<Syslog>
    <Message>{system.time.year}-{system.time.month}-{system.time.day}:{system.time.hour}-{system.time.minute}-{system.time.second}.{system.time.millisecond} {apiproxy.name} {request.header.x-requestor-app} {request.header.x-realm} [{request.header.x-requestor-type}|{request.header.x-requestor}] </Message>
    <Host>logstash.xxxx.com</Host>
    <Port>514</Port>
</Syslog>

Hope this helps.

Upvotes: 1

Related Questions