WMI error ?

Topics: Developer Forum, Project Management Forum, User Forum
Apr 13, 2007 at 6:26 AM
So, I am French, I use polymon... In WMI MONITOR, i can't change option :
Fail or Warn When # returned instances > 0 :
when i change > to < i have this error when i save :
'<', la valeur hexadecimal 0x3C, est un caractère d'attribut non valide. Ligne 5, position 32.

I have a solution ?
Thanks.
Coordinator
Apr 13, 2007 at 12:25 PM
Moi aussi... :-)

Unfortunately that is a bug - I will fix and release a patch shortly. Sorry about that and thanks for bringing this up.
Fred.
Coordinator
Apr 13, 2007 at 12:47 PM
This has been fixed and released in WMI Editor - Patch Special Build.
Apr 13, 2007 at 2:09 PM
Merci...

Connais tu le projet : LANALERTCENTER : http://dipisoft.free.fr/
Il se rapproche du tien...

Sinon une amélioration : Prévoire des actions en cas d'alerte (script; commandes...)
et aussi permettre de forcer un deuxième test si erreur (à cause d'une surcharge réseau).

Sinon superbe projet trés pro... vivement la partie web.


Coordinator
Apr 13, 2007 at 3:57 PM
De rien. Desole du probleme...

Merci pour le link et pour les ameliorations possible - je vais les ajouter au "Roadmap".
Web pour la prochaine iteration :-)
Apr 16, 2007 at 11:05 AM
Yo,

Encore un problème : j'ai l'erreur suivante avec wmi :
Monitor Run Exception Conversion from string "" to type 'Boolean' is not valid.

Mon script wmi :
SELECT Caption, Handle FROM Win32_Process WHERE Caption = "programme.exe"
Qui vérifie si programme.exe est lancé.

Ce qui est drôle, c'est que lors de la création et du test tout fonctionne bien, mais dés que le service (polymon execute) lance le moniteur, j'ai l'erreur...
Une idée...

Coordinator
Apr 16, 2007 at 12:40 PM
Hmm,
Weird...

Could you please send me the result fo this query from your database:

select MonitorXML from Monitor where MonitorID=<You Monitor ID>

where <Your Monitor ID> is the ID of the monitor that is failing?

(The ID can be found in the monitor editor screen in the monitor list on the left hand side - there is a column there that states the ID).

Looking at the code, I cast to a boolean the values of whether Failures/Warning are enabled. It would seem that it is finding an empty string in the XML where it is expecting a zero or 1.
Apr 16, 2007 at 2:58 PM
So,

The result :
<WMIMonitor>
<Host>XXX.XXX.XXX.XXX</Host>
<MonitorQuery><!CDATA[SELECT Caption, Handle FROM Win32_Process WHERE Caption = 'programme.exe']></MonitorQuery> <CounterQuery><!CDATA[SELECT Handle FROM Win32_Process WHERE Caption = 'programme.exe']></CounterQuery>
<Failure Enable="1" Operator="<" Value="1"/>
<Warning Enable="0" Operator=">" Value="0"/>
</WMIMonitor>
Coordinator
Apr 17, 2007 at 11:36 AM
It looks like there is a problem in the XML - this problem was present in the earlier version of the WMI Editor but was fixed in the released patch WMI Editor - Patch Special Build

In the XML nodes:
<Failure Enable="1" Operator="<" Value="1"/>
<Warning Enable="0" Operator=">" Value="0"/>

The Operator values have not been escaped, instead of < it should read < and instead of > it shoudl read >.

I would suggest you delete and recreate the Monitor or alternatively modify the XML in the Monitor table directly.

I believe that is the source of the problem. Let me know if this fixes it.

Merci,
Fred.