Email Setup
exports.main = function (config, context) {
if (context.device.isGateway) {
config.setScalarByOid("1.2.27.1", context.vars.SMTP_SERVER);
config.setScalarByOid("1.2.27.2", "587");
config.setScalarByOid("1.2.27.12", "2");
config.setScalarByOid("1.2.27.13", "3");
config.setScalarByOid("1.2.27.3", "");
config.setScalarByOid("1.2.27.4", "110");
config.setScalarByOid("1.2.27.11", "");
config.setScalarByOid("1.2.27.5", context.vars.SMTP_USER);
config.setScalarByOid("1.2.27.6", context.vars.SMTP_PASSWORT);
config.setScalarByOid("1.2.27.7", context.vars.MAIL_SENDER);
config.setScalarByOid("1.2.27.8", "30");
config.setScalarByOid("1.2.27.9", "72");
config.setScalarByOid("1.2.27.10", "100");
}
};
|
---|
Englisch |
---|
Alert all connections
exports.main = function (config, context) {
if (context.device.isGateway && !context.network.isCentralGateway) {
for (var pos in context.network.vpnconnections);
var actionTable = config.getTableByOid("1.2.2.25");
var row1 = actionTable.createNewRow();
row1.setByOid("1", "7");
row1.setByOid("8", "0");
row1.setByOid("2", context.network.vpnconnections[pos] + "-DOWN");
row1.setByOid("3", context.network.vpnconnections[pos]);
row1.setByOid("10", "4094");
row1.setByOid("4", "0");
row1.setByOid("5", "3");
row1.setByOid("6", "mailto:" + context.vars.MAIL_TO
+ "?subject=VPN-Verbindung im Projekt " + context.vars.projectName
+ " am Standort " + context.vars.locationName + " abgebrochen um %t"
+ "?body=Im Projekt " + context.vars.projectName
+ " wurde die VPN-Gegenstelle " + context.network.vpnconnections[pos]
+ " am Standort " + context.vars.locationName + " unerwartet abgebaut");
row1.setByOid("7", "");
row1.setByOid("9", "root");
actionTable.addOrMerge(row1);
var row2 = actionTable.createNewRow();
row2.setByOid("1", "8");
row2.setByOid("8", "0");
row2.setByOid("2", context.network.vpnconnections[pos] + "-UP");
row2.setByOid("3", context.network.vpnconnections[pos]);
row2.setByOid("10", "4094");
row2.setByOid("4", "0");
row2.setByOid("5", "0");
row2.setByOid("6", "mailto:" + context.vars.MAIL_TO
+ "?subject=VPN-Verbindung im Projekt " + context.vars.projectName
+ " am Standort " + context.vars.locationName + " aufgebaut um %t"
+ "?body=Im Projekt " + context.vars.projectName
+ " wurde die VPN-Gegenstelle " + context.network.vpnconnections[pos]
+ " am Standort " + context.vars.locationName
+ " aufgebaut");
row2.setByOid("7", "");
row2.setByOid("9", "root");
actionTable.addOrMerge(row2);
}
};
|
---|
|
Englisch |
---|
Alert specific Connection
exports.main = function (config, context) {
if (context.device.isGateway) {
var actionTable = config.getTableByOid("1.2.2.25");
var row1 = actionTable.createNewRow();
row1.setByOid("1", "5");
row1.setByOid("8", "0");
row1.setByOid("2", "VOIP-VPN-DOWN");
row1.setByOid("3", "VOIP-VPN");
row1.setByOid("10", "4094");
row1.setByOid("4", "0");
row1.setByOid("5", "3");
row1.setByOid("6", "mailto:" + context.vars.MAIL_TO
+ "?subject=VOIP-VPN Verbindung im Projekt " + context.vars.projectName
+ ", am Standort " + context.vars.locationName + " abgebrochen um %t"
+ "?body=Im Projekt " + context.vars.projectName
+ " wurde die VPN-Verbindung VOIP-VPN am Standort " + context.vars.locationName + " unerwartet abgebaut");
row1.setByOid("7", "");
row1.setByOid("9", "root");
actionTable.addOrMerge(row1);
var row2 = actionTable.createNewRow();
row2.setByOid("1", "6");
row2.setByOid("8", "0");
row2.setByOid("2", "VOIP-VPN-UP");
row2.setByOid("3", "VOIP-VPN");
row2.setByOid("10", "4094");
row2.setByOid("4", "0");
row2.setByOid("5", "0");
row2.setByOid("6", "mailto:" + context.vars.MAIL_TO
+ "?subject=VOIP-VPN Verbindung im Projekt " + context.vars.projectName
+ ", am Standort " + context.vars.locationName + " aufgebaut um %t"
+ "?body=Im Projekt " + context.vars.projectName
+ " wurde die VPN-Verbindung VOIP-VPN am Standort " + context.location.locationName + " aufgebaut");
row2.setByOid("7", "");
row2.setByOid("9", "root");
actionTable.addOrMerge(row2);
}
};
|
---|
|
|