Tweet Tweet! from a fixlet

Hello!

So I was playing with server automation and thought it would be kind of cool to get a tweet when a runbook finished and thought it could apply to baselines and other actions as well so… I wrote a Fixlet that tweets.

It is available here: https://bigfix.me/fixlet/details/6198 the powershell script was one I found online and the author is credited in the script. I modified the script slightly to pull out characters that the API didn’t like.

You can look at my test twitter account: https://twitter.com/apppkgr to see what it looks like when it’s working

It prompts the console operator for some text and prepends it with:

Action ID: 512 Action Name: Tweet (Windows) Info: (your text here)

Requirements:

  1. About halfway down youll have to fill out your twitter API info (or have it prompt the console operator for that info). You can follow this: https://developer.mulesoft.com/docs/display/current/Configure+Twitter+for+API+Access to enable API access to your twitter account.

Issues:

  1. I cannot figure out how to get the parent action information from the fixlet/action (essentially I couldn’t figure out how to get the name of the baseline the fixlet)
  2. API key is plain text in the fixlet

Due to issue #1 I couldn’t find a great use for this fixlet – I was hoping I could just add it to the end of a baseline or a server automation runbook and get a tweet when something is done. If anyone has any ideas for accomplishing that I’d love to hear them!

Let me know if you have any thoughts and thanks for reading!

Content

  1. https://bigfix.me/fixlet/details/6198
2 Likes

This is definitely useful. Someone else previously posted a fixlet/task to tweet things to BigFix.me but it seemed more convoluted, see here: https://bigfix.me/fixlet/details/6112

Instead, just have a parameter at the top of the actionscript that you have to edit by hand to set the API key, then use that parameter down below.

It’s marked Beta in the Bigfix.me site :smile:

Just kidding – I’ll update it to use parameters shortly!

1 Like

I definitely don’t use parameters everywhere I should, but anything that requires a one time customization by the user of the content is definitely a good use case.

In most cases it makes sense to use parameters whenever there is a complex relevance statement used over and over in actionscript to simplify things, but this is another area that I wasn’t always sure made sense and would end up not doing.