-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't send payload #6
Comments
Thanks for the bug report @akzReekoh! Can you try adding |
Hi, This is the output: <!doctype html><title>303 See Other</title><script type="text/javascript"> See OtherThe resource has moved temporarily here. From: Shakeel Mohamed [email protected] Thanks for the bug report @akzReekohhttps://github.com/akzReekoh! Can you try adding console.log(body); on line 464 in splunklogger.js and let us know the output? You are receiving this because you were mentioned. _The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer._ |
Thanks @akzReekoh, it looks like you're using the splunkweb port (8000 by default) instead of the HTTP Event Collector port (8088 by default). Try changing the port and let us know if that helps |
TODO: add tests. Relates to #6
Hello @shakeelmohamed Are there any immediate plans to cut a release for this? |
Hi @calvinlfer, What's the response you get when the forwarder is under heavy load? |
Hey @shakeelmohamed, we get a type-error exception thrown because the Splunk forwarder fails to return a JSON response under heavy load. So |
@shakeelmohamed @calvinlfer Sanitized private IDs and URLs but its returning a 504 with some HTML content:
|
Thanks @hackmad this is very helpful |
We've just released v0.9.2 with this fix. Give it a try! |
Thanks a lot |
Here's the code I'm using (got it directly from your npmjs page):
var SplunkLogger = require('splunk-logging').Logger;
var config = {
token: '',
url: ''
};
var Logger = new SplunkLogger(config);
var payload = {
// Message can be anything; doesn't have to be an object
message: {
temperature: "70F",
chickenCount: 500
}
};
console.log("Sending payload", payload);
Logger.send(payload, function(err, resp, body) {
// If successful, body will be { text: 'Success', code: 0 }
console.log("Response from Splunk", body);
});
And I always get this error:
/home/adinglasan/Desktop/splunk/node_modules/splunk-logging/splunklogger.js:466
if (!requestError && body && body.code.toString() !== "0") {
^
TypeError: Cannot read property 'toString' of undefined
at Request._callback (/home/adinglasan/Desktop/splunk/node_modules/splunk-logging/splunklogger.js:466:55)
The text was updated successfully, but these errors were encountered: