Author |
Message
|
dwilches |
Posted: Thu Jan 13, 2011 8:33 am Post subject: Can Trace nodes create informat events in Windows event log? |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
Hello!
I want to know if its possible to put a event in the Windows Event Log with a level of "Information" or "Warning" by using Trace nodes.
I know this is possible with ESQL in a Compute node by doing:
LOG EVENT SEVERITY 1 VALUES('Mensaje informativo', null,null,null,null,null,null,null);
Thanks ! |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 13, 2011 8:39 am Post subject: Re: Can Trace nodes create informat events in Windows event |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Don't double post - if you post in the wrong section sk for the thread to be moved.
dwilches wrote: |
I want to know if its possible to put a event in the Windows Event Log with a level of "Information" or "Warning" by using Trace nodes. |
What happens when you try it? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 13, 2011 8:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I wonder what the options on the trace node are?
I wonder if they are documented? |
|
Back to top |
|
 |
dwilches |
Posted: Thu Jan 13, 2011 8:49 am Post subject: |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 13, 2011 8:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
dwilches wrote: |
What's a SK ? |
An SK is a typographical error for "ask". |
|
Back to top |
|
 |
dwilches |
Posted: Thu Jan 13, 2011 8:53 am Post subject: |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
mqjeff wrote: |
I wonder what the options on the trace node are?
I wonder if they are documented? |
In the Trace node the configuration I've is:
Destination: Already set to Local Error Log
Pattern: "Hola"
Message catalog: '' (the default)
Message number: 3051 (the default)
I've not found anything useful for my problem about those options in the documentation. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 13, 2011 8:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Are you saying that when you run your flow, that a BIP3051 is not produced in the Application Log? |
|
Back to top |
|
 |
dwilches |
Posted: Thu Jan 13, 2011 9:04 am Post subject: |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
mqjeff wrote: |
Are you saying that when you run your flow, that a BIP3051 is not produced in the Application Log? |
Yes, the event is produced in the Apñplication Log, but I want it with a different logging level.
I'll elaborate more my question:
I have this flow: MQInput -> Trace -> MQOutput
When I run it with configuration of the Trace node being the one I said before, the event goes to the Windows Event Log (Application Log) but it's regarded as an Error Level Event instead of a Information Level Event.
How can I change this default level of logging? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 13, 2011 9:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dwilches wrote: |
How can I change this default level of logging? |
You seriously want every single message that goes through your flow to be recorded in the Event Log, flooding it with informational messages that tell you nothing about what the flow is actually doing and hiding any actual application errors that occur on the box? Why? There has to be a better way of meeting your requirement.
Sorry about the typo earlier.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dwilches |
Posted: Thu Jan 13, 2011 9:23 am Post subject: |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
Vitor wrote: |
dwilches wrote: |
How can I change this default level of logging? |
You seriously want every single message that goes through your flow to be recorded in the Event Log, flooding it with informational messages that tell you nothing about what the flow is actually doing and hiding any actual application errors that occur on the box? Why? There has to be a better way of meeting your requirement.
Sorry about the typo earlier.  |
It's not like that. I overly simpified my problem to that I presented, because a solution for that one is enough for my real problem.
A more elaborated way of describing my objective is that under certain circumstances I want to write to the Windows Event Log, let's say that in a DB error (an error that's outside the scope of the broker). That's because we've specialized monitoring applications that read from the Windows Event Log and take action (send a SMS for example) based in the error level and contents of the event. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 13, 2011 9:30 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Aside from everything else, you'll get better performance out of an ESQL LOG statement than a Trace node.
You'll also get more flexibility in what's produced...
If the intent of using a Trace node is to not have to write ESQL, then of course you could write a JavaCompute node that uses MbService... Or you might be able to achieve something that will call a LOG method or etc. using a Mapping node (that's a wild guess, really).
If the intent of using a Trace node is to be able to "enable or disable" the tracing based on administrative commands - have the ESQL check a User Defined property to see if it should skip the LOG statement or not. These can usually be set dynamically using the CMP API without requiring a redeploy. Or you could otherwise set a flag in a database or etc. |
|
Back to top |
|
 |
dwilches |
Posted: Thu Jan 13, 2011 9:35 am Post subject: |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
mqjeff wrote: |
Aside from everything else, you'll get better performance out of an ESQL LOG statement than a Trace node.
You'll also get more flexibility in what's produced...
|
Thanks mqjeff. The reason for using the Trace node is only because I want to use the specialized node, but if there's no way of accomplishing it with the Trace node, then I'll be OK with the Compute option. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 13, 2011 9:47 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So the BIP3051 is an error event. Some of the other messages in the "user defined" range may not be errors - I've forgotten, really.
You could of course create your own message catalog and instruct the Trace node to use that, and then whatever message number you choose to emit will take on the attributes from the catalog. |
|
Back to top |
|
 |
dwilches |
Posted: Thu Jan 13, 2011 9:52 am Post subject: |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
mqjeff wrote: |
So the BIP3051 is an error event. Some of the other messages in the "user defined" range may not be errors - I've forgotten, really.
|
I've already tried with others like 3053, 3075, etc. I was just throwing numbers to see if that worked.
mqjeff wrote: |
You could of course create your own message catalog and instruct the Trace node to use that, and then whatever message number you choose to emit will take on the attributes from the catalog. |
I'll check it and will come back later! |
|
Back to top |
|
 |
dwilches |
Posted: Fri Jan 14, 2011 6:35 am Post subject: |
|
|
 Novice
Joined: 12 Jan 2011 Posts: 19
|
Well, for what I could see creating my catalog here:
http://www.mqseries.net/phpBB2/viewtopic.php?p=294776
I think that Trace node is only able to use error messages ...
Whenever I try to use a message number from my custom message catalog that is not at the error level from the trace node, I get an error in the event log telling me that the message number is not valid. But if I try with messages at the error level, then it works fine. |
|
Back to top |
|
 |
|