Notifications don't parse command parse keywords

Jorge Matias

24-06-2004 12:47:18


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.

Best Regards,
Jorge Matias


24-06-2004 13:58:12

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


25-06-2004 09:20:25

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.



25-06-2004 09:49:05

[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.


25-06-2004 19:58:51

This will certainly be done before the next release. I've started bug#239 for this issue.


22-09-2004 14:34:40


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,, %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 ?


22-09-2004 18:39:31

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.