Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Proxy alarms

We are looking into to set alarms on proxies yo get alerts on unusual long response times and on failed requests. At the moment we thinking of building a service that pulls the analytics data, conver the format and send it to grafana and set the alarms there.

I would like to know other solution that is in use for setting these kinds of alarms.

I was sad to see it seems like the monitoring dashboard that was in beta in no longer mentioned in the documentation.

0 4 364
4 REPLIES 4

Hi @Olof Haglund, I guess you are talking about API Health, which is no longer available.

If you are an Apigee Edge Cloud Enterprise user, then have a look at API Monitoring .

<or>

Try using the Message Logging policy, which can be used to calculate the response times and send the logs to third-party systems like Splunk, ELK through SysLog(TCP or UDP).

PFA a sample Proxy logging various information to Loggly, loggly-poc-rev2-2018-04-25-rev4-2018-12-12.zip

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="ML-logging-msg-loggly">
    <DisplayName>ML-logging-msg-loggly</DisplayName>
    <Syslog>
        <Message variablePrefix="%" variableSuffix="#">[6d04a707-e504-4daf-b25e-5707ae614e56@41058 tag="apigee-edge-syslog" tag="%organization.name#" tag="%environment.name#" ]
          {
            "messageId":"%messageid#",
            "environmentName":"%environment.name#",
            "requestVerb":"%log.request.verb#",
            "requestScheme": "%log.client.scheme#",
            "requestHost":"%log.request.header.host#",
            "requestUri":"%log.request.uri#",
            "requestUrl":"%log.client#://%log.request.header.host#%log.request.uri#",


            "requestReceivedStartTimestamp":"%client.received.start.timestamp#",
            "requestReceivedEndTimestamp":"%client.received.end.timestamp#",


            "targetSentStartTimestamp":"%target.sent.start.timestamp#",
            "targetSentEndTimestamp":"%target.sent.end.timestamp#",
            "targetReceivedStartTimestamp":"%target.received.start.timestamp#",
            "targetReceivedEndTimestamp":"%target.received.end.timestamp#",


            "requestSentStartTimestamp":"%client.sent.start.timestamp#",
            "requestSentEndTimestamp":"%client.sent.end.timestamp#",


            "latencyTotal":%log.latency.request.total#,
            "latencyTarget":%log.latency.target#,
            "latencyProxy":%log.latency.proxy#,
            "latencyHeader":%response.header.X-Apigee.target-latency#,


            "statusCode":%message.status.code#,
            "statusReason":"%message.reason.phrase#",


            "targetName":"%target.name#",
            "targetVerb":"%log.target.request.verb#",
            "targetUrl":"%log.target.request.url#",


            "requestContent":[%log.request.content#],
            "targetRequestContent":[%log.target.request.content#],
            "targetResponseContent":[%log.target.response.content#],
            "responseContent":[%log.response.content#]
        }
        </Message>
        <Host>logs-01.loggly.com</Host>
        <!-- https://community.apigee.com/articles/22651/how-to-log-message-into-loggly.html-->;
        <Port>514</Port>
        <FormatMessage>true</FormatMessage>
    </Syslog>
    <logLevel>INFO</logLevel>
</MessageLogging>

We use private cloud

Did you explore the Message Logging Policy? In private cloud, we can also save the log as a file on disk.

Why would one want to do that? The analytics data has all the data is needed.