
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
icinga2-api
Advanced tools
Icinga2 Remote api module. You can create, remove, update, etc of icinga2 objects
npm install icinga2-api
Example
The parameters 'group' and 'onServer' was removed from methode 'createHost' and 'createService'
const icingaapi = require('icinga2-api');
var icingaServer = new icingaapi("icingas2server.local", "5665", "apiUser", "apiUserPass");
icingaServer.getHostState("4demo", function (err, result) {
if (err) {
if (err.Statuscode == "404") {
console.log("Host 4demo on monitoring was not found, create one");
// Create a host on icinga2.
icingaServer.createHost("passive-host", "4demo", "4Demo Server", function (err, result) {
if (err) {
console.error(err);
} else {
console.log("Host 4demo was created successfull");
}
});
}
console.error(err);
} else {
console.log(result);
}
})
{
"filter": "service.vars.Backup_Server == servicename",
"filter_vars": {
"servicename": "backupServer"
}
}
var serviceObj = JSON.stringify({
"templates": ["passive-service"],
"attrs": {
"display_name": "Service Top",
"vars.group": "adito",
"vars.server": "dockerdmz"
}
})
var hostBody = JSON.stringify({
"templates": ["passive-host"],
"attrs": {
"display_name": "4Demo Server",
"vars.group": "adito",
"vars.server": "dockerdmz"
}
})
var serviceBody = JSON.stringify({
"templates": ["passive-service"],
"attrs": {
"display_name": "Service on 4Demo Server",
}
})
var dObj = {
'type': 'Host',
'start_time': actTime,
'end_time': endtime,
'author': 'icingaadmin',
'comment': "Downtime for Backup"
}
var setDownTimeObject = {
'type': 'Host',
'start_time': actTime,
'end_time': endtime,
'author': 'icingaadmin',
'comment': "Downtime for Backup",
'filter': 'host.vars.server == server',
'filter_vars': {
'server': "dockerhost"
}
}
var removeDownTimeObject = ({
"type": "Downtime",
"filter": "downtime.author == filterAuthor && host.vars.server == filteredHost",
"filter_vars": {
"filterAuthor": "icingaadmin",
"filteredHost": "dockerhost"
}
})
var perfdataArr = ["Memory in %=" + memUsedinPerc + "%;" + aditoMemWarn + ";" + aditomemErr + ";0"]
var hostObj = JSON.stringify({
"templates": [icingaConf.templatehost],
"attrs": {
"display_name": "Adito Server Public",
"vars.group": "adito",
"vars.AditoServerName": "aditoServer",
"vars.AditoServerVersion": "4.6.34",
"vars.AditoStartupTime": "Mo.",
"vars.CPUs": "4"
})
Check test.js for more details
FAQs
Nodejs Modul to control Icinga2 through api
We found that icinga2-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.