How to access Message Processor machines to check logs

Not applicable

The log files from message logging policy will appear on the Message Processor machines, in the following path.

/opt/apigee4/var/log/apigee/message-processor/messagelogging/<ORG>/<env>/<API>/<revision>/<Logging policy>

I'm not sure how to access the logs from this location.

Can anyone please let me know the steps to access the log files? Thanks!

Solved Solved
0 8 3,695
1 ACCEPTED SOLUTION

adas
Participant V

@Swapna

Like Sudheendra mentioned in his earlier comment. You can follow our documentation here: http://apigee.com/docs/api-services/reference/message-logging-policy#thirdparty

There are 2 options:

- use syslog: configure the message logging policy with syslog server details like ip, port and protocol. Example below:

<MessageLogging name="LogToSyslog">>
  <Syslog>
    <Message>[3f509b58 tag="{organization.name}.{apiproxy.name}.{environment.name}"] Weather request for WOEID {request.queryparam.w}.</Message>
    <Host>logs-01.loggly.com</Host>
    <Port>514</Port>
    <Protocol>TCP</Protocol>
  </Syslog>
</MessageLogging>

- use file logging and then transfer those files to splunk or similar providers:

http://apigee.com/docs/api-services/reference/message-logging-policy#thirdparty

View solution in original post

8 REPLIES 8

If you are using Apigee Cloud, then you don't have access to Message processor machine. The File logging is supported only in Edge on-premises deployments. However from your API proxy you can forward log messages to a remote syslog server. You can use any public log management services, such a Splunk, Sumo Logic, and Loggly.. Here are the instructions to get it working.

adas
Participant V

@Swapna If you are a cloud customer you would not have access to the message processor machines. I am assuming you have an on-premise Apigee Edge installation and would like to see the log files generated by the message logging policy.

The path to the message logging files as specified above, would be:

/opt/apigee4/var/log/apigee/message-processor/messagelogging/myorg/test/1/LogPolicy

where,

<ORG>=myorg, <env>=test, <API>=logging, <revision>=1, <Logging policy>=LogPolicy

You can ssh to your message-processor server machine and use vi to open the above file.

Not applicable

Thank you Sudheendra and Arghya Das.

If our server is on APIGEE cloud and all the logs files will be there on apigee cloud. Then we have requirement to transfer the log files from APIGEE cloud to my own Splunk server. I believe, there is a process to transfer the files. But I'm not sure. Please advice Thanks!

Yes, you can push logs to Splunk using a MessageLogging policy. Link is available on the my earlier response.

Thank you @Sudheendra and @Arghya Das.

How can I access Log file? I know, we can access to putty or winscp but not sure about IPAddress and port number for my organization. Please tell me how can I access it?

My Log file location:

/opt/apigee4/var/log/apigee/message-processor/messagelogging/swapnaadusu07/test/1/LogPolicy

I'm trying to transfer this log file to Loggly and followed the steps in this link (https://www.loggly.com/docs/loggly-sample-data/) but not sure what is the path we have to given here.

Example: This is working fine because we are not transferring our log file.

curl -L http://www.loggly.com/install/LogglySample.log | curl -X POST -H "content-type:text/plain" --data-binary @- http://logs-01.loggly.com/bulk/4d9880d9-d1df-4a45-aa60-6cdf59eba54c/tag/sample

Sample: Transferring our log file.

curl -L /opt/apigee4/var/log/apigee/message-processor/messagelogging/swapnaadusu07/test/1/LogPolicy | curl -X POST -H "content-type:text/plain" --data-binary @- http://logs-01.loggly.com/bulk/4d9880d9-d1df-4a45-aa60-6cdf59eba54c/tag/sample

Please let me know if anything is wrong in this process or in commands.

Thanks!

adas
Participant V

@Swapna

Like Sudheendra mentioned in his earlier comment. You can follow our documentation here: http://apigee.com/docs/api-services/reference/message-logging-policy#thirdparty

There are 2 options:

- use syslog: configure the message logging policy with syslog server details like ip, port and protocol. Example below:

<MessageLogging name="LogToSyslog">>
  <Syslog>
    <Message>[3f509b58 tag="{organization.name}.{apiproxy.name}.{environment.name}"] Weather request for WOEID {request.queryparam.w}.</Message>
    <Host>logs-01.loggly.com</Host>
    <Port>514</Port>
    <Protocol>TCP</Protocol>
  </Syslog>
</MessageLogging>

- use file logging and then transfer those files to splunk or similar providers:

http://apigee.com/docs/api-services/reference/message-logging-policy#thirdparty

So is there no way to capture message processor and other system level logs from Apigee Cloud? I understand I can log custom messages from my proxy, but we'd like to capture the system logs as well.

Also, how do we view proxy deployment errors to get additional info on deployment failures?

Is it possible to log message in an integrated console?. Would be useful for developing in a company infrastructure, many developers cant access to Apigee host machine over message-processor folder. In these cases third tools it isnt available for using loggly ... because many company IPs or DNS names cant be expose outside, security reasons.

I think the best way to develop format message and test them would be a console integrated. Other way that occurs me is put message logging in a header property request/response per example to see that in trace debugging mode.

What do you think about this?.

Thx in advance, team! Salutes from Spain.