By default Graylog2 seems to use these variables in it's email alert callbacks:
Date: ${check_result.triggeredAt}
Stream ID: ${stream.id}
Stream title: ${stream.title}
Stream URL: ${stream_url}
What are the others that are available?
Is {source} and {path} available? The documentation is non-existent regarding alert callbacks.
Try to use
message.fields.yourfield (e.g. message.fields.path)
Source : http://docs.graylog.org/en/1.3/pages/streams.html
Try to use
${foreach backlog message}${message.source}${end}
You should be able to key off of any field that shows up in the default search.
So for standard syslog
message.timestamp
message.source
message.message
message.level
message.process_id
message.application_name
message.facility
The syntax used in the email template can be found here.
https://code.google.com/p/jmte/
Related
Below is log from the windows event viewer. Anyone knows why it is disallowed?
AuthHost disallowed UrlAction: 0x2301 for URL: https://login.microsoftonline.com/xxxx/oauth2/authorize?client_id=xxx&response_type=id_token+token&redirect_uri=xxxx&state=12345&nonce=678910&resource=https://graph.windows.net/.
I found out the reason why I'm facing the disallow error that is, in the option of the "authenticateAsync" method, I should use "useCorporateNetwork" instead of "none".
How to write params to ArduPilot (APM) from NodeJS using node-mavlink?
For example to change geofence enable?
You should read the documentation for the mavlink parameter protocol here: http://qgroundcontrol.org/mavlink/parameter_protocol
The basic idea is that you send a PARAM_SET message to set a parameter value, then wait for an ACK in the form of a PARAM_VALUE message that has the value you just set.
The documentation for the PARAM_SET and PARAM_VALUE messages is in the mavlink defintion XML file: https://github.com/omcaree/node-mavlink/blob/c30f8a63ca6a1ebc1669fefcd07bb3780540e41b/src/mavlink/message_definitions/v1.0/common.xml#L966
Here's an (untested) example of creating and sending a PARAM_SET message to enable the geofence.
I checked the ArduCopter/APM:Copter parameter documentation to learn that the parameter you want is called FENCE_ENABLE, and that a value of 1 means it's enabled. I checked the mavlink message definition for the MAV_PARAM_TYPE enum to learn the enum value for the param_type argument to specify a UINT_8 (my best guess for the type of a boolean parameter).
myMAV.createMessage(
"PARAM_SET",
{
'target_system': 1,
'target_component': 1,
'param_id': 'FENCE_ENABLE',
'param_value': 1.0,
'param_type': 1
},
function(message) {
serialport.write(message.buffer);
});
(See the "Initialization" section of the node-mavlink documentation for information on how to load and initialize the library.)
I haven't written the code to receive the ACK from the drone, but the "Parsing Data" section of the documentation will guide you on how to do that.
I have build an node-based ground control station https://github.com/kvenux/nodegcs
Please feel free to use it.
To make the geofence enable, you need to create a message to set the related param.
Hope it helps.
I am writing a client side code in Visual C++ 2012 using C++ Rest SDK (codename "Casablanca").
I have a client created and wish to POST a text string to the server. However, when I send the following code, it is compiling but not sending sending the request.
When I remove everything after "methods::POST" and send a blank post request, then it is sent and received by the server.
Can you please guide me where the problem is. The documentation related to this function is available on Casablanca Documentation.
pplx::task<http_response>resp = client.request(methods::POST,L"",L"This is the random text that I wish to send", L"text/plain");
I think the usage you give here looks correct.
Is your Casablanca the latest version ? Please check that out from here : http://casablanca.codeplex.com/
If you are sure your measurement is accurate, you may want to create a minimal repro and file a bug here : http://casablanca.codeplex.com/workitem/list/basic
I was having a similar problem, all my POSTs was arriving in blank on server , after a few hours work above it, i found a possible solution.
I changed the default content type to application/x-www-form-urlencoded and I started to pass the values like this Example data=text1&data2=text2
client.request(methods::POST,L"",L"data=text1&data2=text2", L"application/x-www-form-urlencoded");
The body parameter must be a json::value.
I cannot comment yet so I have to put my thoughts in an answer. I solved this problem like this: There is an overload of the request method that takes as a parameter the content type so that you do not have to change the code.
m_client->request(methods::POST, L"/statuses/update.json?" + url_encode(data),L"",L"application/x-www-form-urlencoded");
Obviously you would have to implement the url_encode method but that is not difficult. There is a pretty good implementation in "Cassablanca". A search on this site will alos turn up some good examples.
For some reason I cannot get kohana to log my custom errors. Here is the code:
$log = new Log;
$log->add(Log::ERROR, 'There was a conflic with the username and/or email. UUID: '.$user['uuid'].' username: '.$user['username'].' email: '.$user['email']);
Thanks in advance for any help.
The simplest way would be to use Kohana's built-in logger since it's already setup:
Kohana::$log->add(Log::ERROR, "your debug info")->write();
Otherwise, if you want to use a custom one, make sure you assign a writer to it - it can be file, database, etc.
I am writing a Google Chrome extension. The following request message works:
chrome.extension.sendRequest({cmd: "examineDetails", urlList: profileLink, photoList: photoType});
This request doesn't work:
chrome.extension.sendRequest({cmd: "openMessage", url: messageLink, keyWordList: keyWord, bGreeted: bAlreadyGreeted});
Is there a limit to the number of variables I can pass in a message or am I formatting this wrong?
It should work. Check your code and request listeners and try again.