Hello,
So I am now trying to implement SSH checks for the Juniper Routers we deploy.
I have been able to succesffuly SSH to the device and run the command I want that shows the output I just now need to filter the output to keep only the value I want.
As you can see I am getting an output but all I want to keep is that value underlined in blue and literally junk everything else.
I did think of doing this by trimming the collums in my command that is being run by Zabbix on the Juniper however there is no rear trim to remove the stuff after the "79999" as well so if I trimmed the collums I would only be able to get rid of where it says Bit rate.
I have tried using Javascript to do it
parseNum = str => +str.replace(/[^.\d]/g, '');
let str = 'a1b2c.d3e';
console.log(parseNum(str));
but no dice I am always getting that output.
So Can anyone guide me on how I can trim out all that extra stuff I dont need. I only want to keep the "79999".
So I am now trying to implement SSH checks for the Juniper Routers we deploy.
I have been able to succesffuly SSH to the device and run the command I want that shows the output I just now need to filter the output to keep only the value I want.
As you can see I am getting an output but all I want to keep is that value underlined in blue and literally junk everything else.
I did think of doing this by trimming the collums in my command that is being run by Zabbix on the Juniper however there is no rear trim to remove the stuff after the "79999" as well so if I trimmed the collums I would only be able to get rid of where it says Bit rate.
I have tried using Javascript to do it
parseNum = str => +str.replace(/[^.\d]/g, '');
let str = 'a1b2c.d3e';
console.log(parseNum(str));
but no dice I am always getting that output.
So Can anyone guide me on how I can trim out all that extra stuff I dont need. I only want to keep the "79999".
Comment