Attaching the script I was talking about,
rmon {
alarm 1 {
interval 10;
variable jnxOperatingCPU.9.1.0.0;
sample-type absolute-value;
rising-threshold 70;
rising-event-index 1;
}
event 1 {
type log;
}
}
policy test {
events snmpd_rmon_eventlog;
then {
execute-commands {
commands {
"set cli timestamp";
"set task accounting on";
"show task accounting detail";
"show krt queue";
"show krt state";
"show chassis routing-engine |no-more";
"show system uptime |no-more";
"show system connections | no-more";
"show system processes extensive no-forwarding | no-more";
"show system statistics | no-more";
"show system virtual-memory no-forwarding | no-more";
"show task memory detail | no-more";
"show task memory summary | no-more";
"show task io";
"show task statistics";
"show task jobs";
"set task accounting off";
}
output-filename CPU-GET-HIGH.txt;
destination log-for-CPU-GET-HIGH;
output-format text;
}
}
}