Created
January 22, 2014 12:39
-
-
Save MiLk/8558047 to your computer and use it in GitHub Desktop.
Use Nagios query handler with Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
var test_message = "TestMessage"; | |
var client = net.connect({ path: '/var/nagios/rw/nagios.qh' }, function() { | |
client.write('@echo ' + test_message + '\0'); | |
}); | |
client.on('data', function(data) { | |
console.log(data.toString()); | |
client.end(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment