Notifications don't parse command parse keywords

Jorge Matias

24-06-2004 12:47:18

Hello,

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

A7V

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

silfreed

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.

-Doug

A7V

25-06-2004 09:49:05

[quoteb606f02ac7="silfreed"]Sorry, A7V; been a busy week for both of us.

-Doug[/quoteb606f02ac7]

Doug,

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.

balleman

25-06-2004 19:58:51

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

A7V

22-09-2004 14:34:40

Hi,

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%
[/colorc5d594aaeb]
Btw, the example notification seems to be one % short
[code1c5d594aaeb]
INSERT INTO notifications VALUES (1,'Broadcast message to linux users','wall problem with %ip',0); [/code1c5d594aaeb]
Should read [bc5d594aaeb]%ip%[/bc5d594aaeb] no ?

balleman

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.