Balanced

Best way to have a good idea, is to have lots of ideas

Category: Scripts

Scheduled BigIPReport CSV exports via mail

Today I got a feature request over at Devcentral from a BigIPReport admin to add the possibility to add scheduled exports of BigIPReport via mail. While it does not really fit into the project itself actually doing it is actually simpler than you might think!

Using a mix of Powershell and .Net we can download the Json files, parse them and generate a CSV file that can be sent to anyone in the organisation.

Please note that as usual there’s a thousand ways to skin a cat (funny expression right there) and this script could be improved quite a bit. Some potential examples:

  • Creating the attachment from memory instead of a temporary file
  • Changing the mail format to HTML and adding some useful statistics like virtual server count, pool count, node count etc.
  • Adding a database, or using a flat file could also give out trends.

If anyone is up to the task and wants to share the result I’d be happy to post it here along with your name. 🙂

Anyways, here’s the script!

 

F5 case creation tweaks

Oveview

F5 has recently updated their support portal and it was a great leap forward compared to the old one. Kudos on that!

Here’s a few functions that could we further improved:

  • Being able to log cases from a company perspective. When I log a case I want all my colleagues with access to the F5 support to be able to see the case, not just me.
  •  I want F5 to give me a drop down of the serial numbers my company owns instead of me having to find them myself.
  • The modules should be filtered based on what I have activated. This might require some call home function to be enabled on the devices, but the choice would be nice.
  • Give me an option to chat with a support representative. Checkpoint has this and it’s really good.

While waiting for these things to happen I’ve written a script that will do some of those things today.

Features

Only show the activated modules

Only show the versions you have installed

You can still click on “Show all modules” to unhide them again.

Choose the load balancer from the drop-down

Get the serial number auto populated and verified. The drop-down is dynamically populated based on your BigIP Report data.

 

Other tweaks

  • Configure default case severity
  • Configure default choice for “Was this working before?”
  • Configure default chose for “Is the problem related to a virtual server?”
  • Configure a default peferred method of contact
  • Configure a default time zone

Prerequisites

  • BigIP Report – See more here.
  • Tampermonkey – See more here.

How to use

  1. Install BigIP Report if you haven’t already done so.
  2. Install TamperMonkey.
  3. Click on the new script button:
  4. Replace everything in the script content with the content of “Casecreation.js”:
  5. Configure the script. The only mandatory configurations are the connect option in the TamperMonkey script metadata and the URL to the loadbalancers.json file of BigIP-Report:Example for if BigIPReport was hosted on linuxworker.j.local:

  6. Done!

 

BigIP Report just got an upgrade

BigIP Report delivers information to colleagues in an format that gives good overview. It saves administrators time by avoiding questions about where things are hosted, the status of pools and members or even when looking for things themselves across their whole environment.

I’ve been working hard the last couple of weeks to improve the tool and figured the results warranted a post about the recent feature additions.

New style

Been considering this for a long time but just never came around to it. Until now that is. The new report has a brighter theme and even more important, a consistent one. Where there was previously different looks you’ll find that most, if not all, of the report sections has been updated to use the same style.

Polling

For those that wants to have updated member states more often there’s now an option to configure polling of member states. This ensures that the states of the members are up to date.

The console

Device overview

Devices breaks down, serial numbers change upon replacement and people forget to update. When logging a case with F5 you’ll sometimes have to log in to the device and check the serial number. If you have many devices you’ll know what I’m talking about.

This overview gives you dynamically updated table of your device so when a device is being replaced the new one will automatically appear here. Along with version, model and more. Check out the picture below to see an example.

Defined iRules

This part used to be available in the main report section but has now been moved to the console. All iRules can be shared if you choose to do so. But in case you want to only share some, here’s where you do it.

Certificates

This part gives you an overview of all your certificates. Checking if there are any certificates expiring soon is as easy as sorting by expiration dates in the table.

Logs

Does something look strange, or is the polling failing or disabled? Checking the logs section of the console might give you an idea of what’s wrong.

Help

Contains tips and tricks on things that users might not be aware of.

Improved sharing

The new version has a more modern way of letting users share what they’re seeing. Using the hash URI instead of query strings makes it possible to simply copy the URL in the browser. It’s now possible to share iRules, Data Group Lists, Virtual server details and every piece of the new shiny console.

Export to CSV

A bunch of people asked for the ability to export searches to CSV. If you enable it in the report configuration a button will be added to the main view where you can export the existing view to CSV.

Want to try it out? Installation instructions are available here:

Bigip Report

BigIP Report feedback requested

Want to speak your mind, share some feedback?

The report has been evolving a bit more towards being more user friendly lately. Icons has been added, column toggle, preferences and reset search.

But truth be told, I more or less have no idea who uses the tool and I’ve got no statistics whatsoever except for the feedback I get in the insanely big comment thread on devcentral.

To make it easier for me to make better decisions/priorities about future features, or even to get ideas from you guys and girls, I’d love if you could answer this short poll (no registration is required):

http://www.polljunkie.com/poll/facgco/bigipreport-survey

While the poll is anonymous and the questions is not targeted at you personally it’d nice with an introduction in the last free text question, if you feel like it. 🙂

Any feedback (good or bad) is appreciated, as it always has been.

Thanks!

Using F5 REST API with roles

I recently learned that with version 12 comes the possibility to use roles with the REST API, but only when using token based authentication.

That’s fantastic! Finally there is a secure way of using the REST API without handing over administrative access.

Adding an example in Powershell and a link to an article on Devcentral about how to do it in Python.

Updating with code from the Powershell Guru Joel Newton on how to patch the token to make it valid for 10 hours instead of the default 20 minutes:

I also recommend checking out Joels Powershell module at the Devcentral codeshare!

Synergy effect of running BigIPReport

This could be useful depending on your environment. Bigipreport let’s you find things, but it can only go so far.

If you want to do a bit more advanced searches you can use the built in functions in powershell to convert json into objects. The beauty with powershell objects is that you can easily run queries against them.

Attaching a few examples to get you going:

 

Tampermonkey – F5 Case creation

Old script does not work anymore since F5 changed their support portal. New script is available here.

Bigip Report installation instructions

New and better instructions for Bigip report can be found here.

 

Purging Limelight CDN items with Powershell

Taking care of the CDN can be a hassle sometimes. Unless you implement the perfect system with unique keys for every item update you will need to purge content once in a while.

We asked for some guiding from Limelight but they did not have any example for Powershell themselves so I had to translate the existing one from Perl. Hardest part was the authentication and getting the hash right but with some help from the nice people at stackoverflow it worked out in the end.

Kudos also to Limelight for having a good API documentation.

As always, if you improve it then please share it.

Contributions is always appreciated!

Read More

F5 LTM Web UI Tweaks

The F5 Web UI usability has not improved that much in a long time. Version 12 is starting to do things about it, but it’s too early to adopt unless you absolutely need some of its features.

The script is using Tampermonkey, a client side script engine, to add functionality to the F5 UI.

Read More

Powered by WordPress & Theme by Anders Norén