This is a Splunk Modular Alert for posting alerts to a Yammer group.
- Splunk 6.3+
- Supported on Windows, Linux, MacOS, Solaris, FreeBSD, HP-UX, AIX
- Active Office 365 Yammer subscription
- Download the release
$SPLUNK_HOME/bin/splunk install yammer_alerts.spl -update 1
- Restart Splunk
- Create a user for Splunk to send as the alerts
- Ensure that user can post to all the groups that you want
Okay, this is horrible, but it works. There is an issue on GitHub to fix this.
Because I haven't yet created a proper auth process in Splunk, you'll have to work around it. We'll create a client application then manually go through the process of getting a code
then the token
. These instructions are taken from the Yammer Dev Docs - Test Token
- Create a Yammer Client Application
- Set the
Redirect URI
to https://www.yammer.com/
- Make a note of the
Client ID
andClient Secret
- Paste this URL into your browser where the
client_id
is the value obtained above
https://www.yammer.com/oauth2/authorize?client_id=[client_id]&redirect_uri=https://www.yammer.com/
- Copy the
code
parameter from the URL created - Paste this URL into your browser, where
client_id
,client_secret
are obtained in step 3 above and thecode
comes from step 4
https://www.yammer.com/oauth2/access_token.json?client_id=[client_id]&client_secret=[client_secret]&code=[code]
- From the JSON object returned, copy the
token
field
- Settings -> Alert Actions -> Yammer Alerts -> Setup Yammer Alerting
- Paste the token from step 6 above into the text box
Edit or create the file $SPLUNK_HOME/etc/apps/yammer_alerts/local/alert_actions.conf
[yammer]
param.token = <token from yammer.com>
Perform a search in Splunk and then navigate to : Save As -> Alert -> Trigger Actions -> Add Actions -> Yammer Alerts
On this dialogue you can enter the group_id
to post to and body
to send.
For the body field, token substitution can be used just the same as for email alerts
Browse to: Settings -> Alert Actions -> Yammer Alerts -> View Log Events
Or you can search directly in Splunk
index=_internal sourcetype=splunkd component=sendmodalert action="yammer"
- Is your
group_id
correct? - Are your alerts actually firing?
- Is your auth token correct?
This project was initiated by John Oxley, [email protected]