Hi @kamlesh_vaghela , I have changed the file format to this, {
"Info":
{
"Unit": "ABC",
"Project": "XYZ",
"Analysis Summary": {
"DB 1":{
"available": "1088kB",
"used": "172.8kB",
"used%": "15.88%",
"status":"OK"
},
"DB2 2":
{
"available": "4096KB",
"used": "1582.07kB",
"used%": "38.62%",
"status":"OK"
},
"DB3 3":
{
"available": "128KB",
"used": "0",
"used%": "0%",
"status":"OK"
},
"DB4 4":
{
"available": "16500KB",
"used": "6696.0KB",
"used%": "40.58%",
"status":"OK"
},
"DB5 5":
{
"available": "22000KB",
"used": "9800.0KB",
"used%": "44.55%",
"status":"OK"
}
}
}} And Changed the query to | spath output=Analysis_Summary Info.Analysis_Summary
| rex field=Analysis_Summary "\"(?<Database>[^\"]+)\":{ \"available\"\:\s\"(?<available>[^,]+)\",\"used\"\:\s\"(?<used>[^,]+)\",\"used%\"\:\s\"(?<used_p>[^,]+)\",\"status\"\:\"(?<status>[^}]+)\"}" max_match=0
| eval tmp = mvzip(mvzip(mvzip(mvzip(Database,available),used),used_p),status)
| mvexpand tmp
| eval Database=mvindex(split(tmp,","),0), available=mvindex(split(tmp,","),1), used=mvindex(split(tmp,","),2), used_p=mvindex(split(tmp,","),3), status=mvindex(split(tmp,","),4)
| table Database available used used_p status But i am not able to collect the data.It says tmp does not exist.Is there any mistake in the regular expression?
... View more