Splunk Search

Transpose lines to Column

felipesodre
Path Finder
{
"DbMaintenanceDailyRoutineSummary": {
"success": [
{
"server-002": [
{
"vacuum": true,
"analyze": true,
"warehouse": "mydatabase@aaaaaa"
},
{
"vacuum": true,
"analyze": true,
"warehouse": "mydatabase@bbbbbb"
}
]
},
{
"server-003": [
{
"vacuum": true,
"analyze": true,
"warehouse": "mydatabase@ccccccc"
},
{
"vacuum": true,
"analyze": true,
"warehouse": "mydatabase@ddddddd"
}
]
}
],
"fail": [
{
"server-002": [
{
"vacuum": true,
"analyze": false,
"warehouse": "mydatabase@eeeeee"
}
]
},
{
"server-003": [
{
"vacuum": false,
"analyze": true,
"warehouse": "mydatabase@fffffff"
},
{
"vacuum": true,
"analyze": false,
"warehouse": "mydatabase@gggggg"
},
{
"vacuum": true,
"analyze": false,
"warehouse": "mydatabase@hhhhhh"
}
]
}
]
}
}

 

I am wondering how can I convert this result in something like the following message to sent it as a alert by email.

 

DbMaintenanceDailyRoutineSummary

fail:

server002:

mydatabase@eeeeee:  analyze: false, vacuum: true

server003:

mydatabase@fffffff - analyze: false, vacuum: true

mydatabase@ggggg - analyze: false, vacuum: true

 

success:

server002:

mydatabase@aaaaaa- analyze: true, vacuum: true

mydatabase@bbbbbb - analyze: true, vacuum: true

server003:

mydatabase@ccccccc  - analyze: false, vacuum: true

mydatabase@dddddd - analyze: false, vacuum: true

Labels (4)
0 Karma
1 Solution

felipesodre
Path Finder

Thanks for your help, appreciate it. But the  solution presented is not I would like to have.

I just want to change that part from this:

"vacuum": true,
"analyze": false,
"warehouse": "mydatabase@hhhhhh"

to this:

"warehouse": "mydatabase@hhhhhh", "vacuum": true, "analyze": false

 

View solution in original post

0 Karma

felipesodre
Path Finder

Thanks for your help, appreciate it. But the  solution presented is not I would like to have.

I just want to change that part from this:

"vacuum": true,
"analyze": false,
"warehouse": "mydatabase@hhhhhh"

to this:

"warehouse": "mydatabase@hhhhhh", "vacuum": true, "analyze": false

 

0 Karma

felipesodre
Path Finder

Thanks.

 

This is all I need.  Issue fixed.

 

Appreciate it!

0 Karma

to4kawa
Ultra Champion
 

felipesodre
Path Finder

Yes it is. Thank you.

0 Karma

to4kawa
Ultra Champion

OK. My answer is not your solution.

0 Karma

to4kawa
Ultra Champion

 

 

 

 

0 Karma

to4kawa
Ultra Champion
 
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...