Notifications don't parse command parse keywords
I'm using netmrg 0.16 at the moment, and I'm doing some experiences with Event/Notifications.
I have noted that, when executing the command of a Notification, the device keywords (e.g. %ip%, %dev_name%) are not parsed before the call.
I have checked the file "event.cpp" in the function/method
"void process_responses(DeviceInfo info, MYSQL *mysql)" I saw that the problem is in there. No token parsing is being done.
I was experimenting with notifications also and used [b90f1837771]/bin/echo '%dev_name%, %ip, %test_name%, %test_result%' >> /home/netmrg/teste.log [/b90f1837771] and like Jorge all I got was the unparsed keywords.
I had called for help on this issue in this thread
Btw, I'm from Portugal too lol
Sorry, A7V; been a busy week for both of us.
Looks like Jorge is on the right track; I'll talk with the other developer today and see if we can't get a fix in CVS for this shortly.
[quoteb606f02ac7="silfreed"]Sorry, A7V; been a busy week for both of us.
We all have work to do, and I do realize this is not your main job.
I can only thank you and the other developers for the time you invest in this project which I can only seen good things for the future.
As I am not a programmer but rather a sysadmin(rusty C/C++ programming from 10 years ago wink ) I can only help by reporting problems and help the project with new ideas if they are, which I already confirmed they are, welcomed.
I have a considerable network size, so that too can be a nice testimonial for other people.
This will certainly be done before the next release. I've started bug#239
for this issue.
Just upgraded to 0.17, good work ! D
I was playing around with notifications and wanted to test the changes in 0.17 and there is still an issue with some unparsed keywords
I was testing this 4 keywords
%dev_name%, %ip%, %test_name%, %test_result%
and the output was
ce01pc02, 10.137.69.02, %test_name%, %test_result%
Btw, the example notification seems to be one % short
INSERT INTO notifications VALUES (1,'Broadcast message to linux users','wall problem with %ip',0); [/code1c5d594aaeb]
Should read [bc5d594aaeb]%ip%[/bc5d594aaeb] no ?
Yes, this was an issue we recognized shortly after 0.17 was released, unfortunately. It's Bug#283
. I'll add the problem with the demo test to this bug.