Playing with the new unstable release 3.6.x you may get error messages like

“No file defined for this call! May be it’s an old store-firmat?
You can delete old store-files or use storemigrator.pl”

And when you try to migrate that store:

”..Calls seems to have to be migrated already – I stop now”

In that situation you may want to have a method to identify a store files format.

The binary format of the store-file has not changed – this is not in my hands. But how we store the single calls.

You can inspect a stores internal organization (organization my be the better expression that format) by using -vvv with storemigrator.pl:

Using an old store would return a lengthy output:

[prompt]   scripts$ perl storemigrator.pl -o dev/old_stores/sim83n1.perf_disk.store -vvv
main 64 Version: QUORUM-VERSION-TAG
main 113 Dump of $old_store:
$VAR1 = bless( {
                 'info' => undef,
                 'object' => 'perf_disk',
                 'calls' => [
                    bless( {
                      'ts' => '1435741470',
                      'nodes' => {
                        'sim83-01' => bless( {
                         'instances' => {
                         'NET-1.25' => bless( {
                         [...]

A new store however would return the much shorter

[prompt]  scripts$ perl storemigrator.pl -o check_netapp_pro/store/sim83n1.perf_disk.store -vvv
main 64 Version: QUORUM-VERSION-TAG
main 113 Dump of $old_store:
$VAR1 = bless( {
                 'calls' => [
                              bless( {
                                       'ts' => '1467619818',
                                       'nodes' => undef,
                                       'fn' => '/Users/ila/Documents/Kunden/Quorum/Plugins/NetApp/nagios.netapp_pro/scripts/check_netapp_pro/store/calls/sim83n1.perf_disk.1467619818.call'
                                     }, 'Il::Nagios::Store::Call' ),
                              bless( {
                                       'fn' => '/Users/ila/Documents/Kunden/Quorum/Plugins/NetApp/nagios.netapp_pro/scripts/check_netapp_pro/store/calls/sim83n1.perf_disk.1467619860.call',
                                       'nodes' => undef,
                                       'ts' => '1467619860'
                                     }, 'Il::Nagios::Store::Call' )
                            ],
                 'object' => 'perf_disk',
                 'host' => 'sim83n1',
                 'info' => undef,
                 'storedir' => '/Users/ila/Documents/Kunden/Quorum/Plugins/NetApp/nagios.netapp_pro/scripts/check_netapp_pro/store',
                 'nodes' => undef
               }, 'Il::Nagios::Store' );

Call seems to have be migrated already - I stop now.

In the new organization you’ll see a new key ‘fn’ => ‘…’ pointing to the calls file. In the old structure you see a complex data-structure instead of the fn-key.

This is also the main difference: Instead of having the whole data in one monolithic file, each call has it’s own file now and can be read individually and only if needed into memory.

When to migrate

Migrating a store is not the standard way. The standard and recommended way is to delete all stores and let the getters build new ones.

The migration tool is for selected, valuable long-term history stores only.