Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

Network Change & Configuration Management

Reply

CSS Error Invalid line

BBarltrop
Techie
Posts: 3
1166     0

I am a PERL monkey so have been doing all the scripting in PERL. Thought I would try my hand at CSS and it keeps screaming at me about invalid lines. Could someone tell me what is wrong with this script? I am trying to schedule a daily script to run to check if there are any active alarms on the juniper devices and trigger a custom issue. I know I can do it in PERL, but I would like to get past this and have the option of using CSS. I have gotten invalid lines on "Script-Devices", "Script-Groups", "Script-Schedule", "Trigger-Description", and "Trigger-Variables". Each time I got one I changed the line or commented it out, then tried to save it and got another invalid line error. I gave up at Trigger-Variables.Script-Filter: $Vendor eq "Juniper" $memberOf ["Routers","Switch-Routers"]Script-Schedule: 0 4 * * *#########################################################################Action: Show System Alarms Action-Description: Execute the "show system alarms" command and process the output Action-Commands: SET: $active_alarms = "yes" show system alarmOutput-Triggers: Process Output #########################################################################Triggers: Process Output Trigger-Description: Parse output of command to determine if alarms are active Trigger-Variables: $alarm_line StringTrigger-Template: [[$alarm_line]]Trigger-Commands: { $alarm_line =~ /^Alarm time/ } SET: $active_alarms = "no" Trigger-Commands: { $alarm_line !~ /^No alarms currently active/ } SET: $active_alarms = "no" Output-Triggers: Active JUNOS alarms ########################################################################Issue: Active JUNOS alarms Issue-ID: JUNOS_Alarms Issue-Severity: error Issue-Description: If the above matched our criteria, display an error with switch infoIssue-Filter: $active_alarms eq "yes" Issue-Details: Device $Name Alarm $alarm_line ########################################################################### End of Script ###########################################################################

Showing results for 
Search instead for 
Do you mean 

Recommended for You