trying to configure splunk with messaging logging policy.

Not applicable

I'm trying to configure splunk with messaging logging policy but couldn't complete the configuration with the documentation from splunk. I need more information regarding the setup.

0 4 1,398
4 REPLIES 4

Not applicable

Hi @Rajesh.Surapaneni. Apigee Message logging policy Syslog over TCP or UDP protocols. I was quickly looking at Splunk documentation and the protocol is supported. You can check that your Syslog server is reachable by posting the following command:

nc -w0 -u 192.168.0.1 514 <<< "testing again from my home machine"

http://www.techiecorner.com/1496/how-to-send-message-to-syslog-server/

Other alternative is to leverage the Splunk REST API. But since you're asking about Message Logging policy, I assume that you're intending to use Syslog. Hope it helps!

Former Community Member
Not applicable

Hi @dzuluaga can you reference some samples of using the Splunk REST API to actually log information to Splunk.

Sure thing @Prithpal Bhogill.

Here's an example of receivers resource and Splunk SDK in the past (it requires to download Splunk and make it publicly available):

curl -k -u admin:pass "https://localhost:8089/services/receivers/simple?source=www&sourcetype=web_event" -d "Sun Jul 10 15:56:02 PDT 2011   User myusername logged in successfully."

You can find more examples here.

Other options, please take a look at their SDKs for JavaScript, Java or Python, which you can conceivably leverage from Apigee policies or Node.js. Please do take into consideration that this may impact the latency on your APIs. Except for Message Logging policy, which is available through Apigee PostClientFlow. For Node.js APIs, it is also recommended to leverage a Logging framework. Here's an article leveraging the push model (REST API) .