All Apps and Add-ons

Splunk Add-on for Microsoft Azure: Would it be possible to add in the ability to select the format for the Azure Table Storage PartitionKey?

clogssplunk
Explorer

Hi @jconger_splunk,

I noticed you added the ability to import data from generic Azure Table Storage. Would it be possible to add in the ability to select what format the PartitionKey is in?

By default it uses Ticks, but it would be nice to select ReverseTicks as well. This is an option that is used by:

https://github.com/stemarie/log4net.Azure

I have this working in a script I modified using your script from 1.1.0, but it would be nice to have this available in your app.

The following is what I added to make it work.

def reverse_ticks(dt):
    max_ticks = 3155378975999999999
    return int(max_ticks - ticks(dt))

As time progresses the PartitionKey gets smaller, so I modified a couple of lines under def stream_table_data:

        date_time_start = reverse_ticks(date_time_start)
        filter_string = "PartitionKey lt '0%s'" % str(date_time_start)

Mark

0 Karma

jconger
Splunk Employee
Splunk Employee

For the generic table data input, specifying the PartitionKey format was considered. But, the PartitionKey can be anything the developer wants it to be. It just so happens that Microsoft is kind enough to write the PartitionKey for some tables as ticks (this is good since the PartitionKey is indexed by Azure - which means faster searching). So, we settled on allowing the Splunk admin to specify a timestamp field.

What is the use case for reverse ticks? I'm guessing you want to start at the most recent table entity and work you way backwards? If so, I'm missing how you are going to get any new entities written to your table storage after the initial query.

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...