Hi Monks,
Good day...!!
I am having a status log file which keeps a track of previous script run. As per requirement, need to compare the current run to the previous run and subsequently sends out notification alerts.
The status file content is build like a reference tree as below:
FreeTablespace_Status.log
$ref = { 'servername.com' => { 'DB01.com' => { 'TableSpace +' => { ' +Tablespace_Name' => { + 'OK' => 1, + 'Node' => 'servername.com', + 'Description' => 'Table Space threshold less th +an 90%', + 'UniqueID' => '12345667', + 'Severity' => 'Normal', + 'Title' => 'Servername table space threshold is + less' + }, ' +Tablespace_02' => { + 'OK' => 1, + 'Node' => 'servername.com', + 'Description' => 'Table Space threshold less than +90%', + 'UniqueID' => '3452555', + 'Severity' => 'Normal', + 'Title' => 'Servername-> tablespace02 threshold is + less' + } + } } }, 'servername02.com' => { 'DB02.com' => { 'TableSpace +' => { ' +Tablespace_01' => { + 'OK' => 1, + 'Node' => 'servername02.com', + 'Description' => 'Table Space threshold less th +an 90%', + 'UniqueID' => '0985433', + 'Severity' => 'Critical', + 'Title' => 'servername02 tablespace01 threshold + is less' + }, ' +Tablespace_02' => { + 'OK' => 1, + 'Node' => 'servername02.com', + 'Description' => 'Table Space threshold less than +90%', + 'UniqueID' => '4283289', + 'Severity' => 'Medium', + 'Title' => 'servername02-> tablespace02 threshold +is less' + } + } } }, }
I am looking to delete one reference Server01 content in the above. Looking for some help on this
2018-03-27 Athanasius added code and paragraph tags
In reply to Delete reference tree from a file by aravind.kalla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |