/*
	This file contains some sample policy-statements.

	Note to VIM users: this file should have syntax highlighting; enable with (:syntax on).
*/

#include "@resolved_sysconfdir@/format-statements.conf"
#include "@resolved_sysconfdir@/map-statements.conf"

policy-options {
	policy-statement IGNORE_GENERIC_NETSCREEN_SYSLOG {
		apply-format SYSLOG_FORMAT;
	}

	policy-statement NETSCREEN_TRAP {
		term FIREWALL_FUNCTION_TRIGGERED {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapFw;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	security;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	security;
					}
				}
				accept;
			}
		}
		term HARDWARE_PROBLEM {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapHw;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	hardware;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	hardware;
					}
				}
				accept;
			}
		}
		term SOFTWARE_PROBLEM {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapSw;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	software;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	software;
					}
				}
				accept;
			}
		}
		term TRAFFIC_CONDITION {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapTrf;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	security;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	security;
					}
				}
				accept;
			}
		}
		term VPN_TUNNEL_STATUS {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapVpn;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	vpn;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	vpn;
					}
				}
				accept;
			}
		}
		term NSRP_STATUS {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapNsrp;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	hardware;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	hardware;
					}
				}
				accept;
			}
		}
		term GLOBAL_PRO_PROBLEM {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapGPRO;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	hardware;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	hardware;
					}
				}
				accept;
			}
		}
		term DRP_STATUS {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapDrp;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	hardware;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	hardware;
					}
				}
				accept;
			}
		}
		term INTERFACE_FAILOVER {
			from {
				protocol snmptrap;
				event		snmp:netscreenTrapIFFailover;
			}
			then {
				apply-map SOURCE_TO_ELEMENT_DATA_MAP;
				set {
					state information;
				}
				output {
					gui {
						brief		"Firewall detected @snmp:netscreenTrapType@";
						detail	"@snmp:netscreenTrapDesc@";
						channel	hardware;
					}
					syslog {
						detail	"@snmp:sysName.0@: @snmp:netscreenTrapType@ deteced - @snmp:netscreenTrapDesc@";
						channel	hardware;
					}
				}
				accept;
			}
		}
		apply-format SNMPTRAP_FORMAT;
	}
}

/*
** Local Variables:
** c-basic-offset: 3
** tab-width: 3
** End:
** vim600: fdm=marker
** vim: noet ts=3 sw=3
** vim: syntax=sella_nms
*/
