Possible to create XML file and wait to read a return file?

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Manti
Posts: 4
Joined: Mon Feb 02, 2009 8:06 am

Possible to create XML file and wait to read a return file?

Post by Manti »

Hello,

This question might be rather far fetched, but i figured id give it a go seeing how dynamic host monitor is.

I would like to have an active RMA to create an XML message into a folder (same message except an id that needs to be randomized).
(a process is then sending this message and puts the return message in another folder)
2nd step would be to wait for a return file to pop up in a different folder, where it would compare the messageid and see if it is the same.

The alert would trigger if the time delta is larger than x seconds or even timed out.

If it's possible then I guess it would be done with the scripting engine, however i don't know the potential of it.
Possibly can do something in conjuction with the microsoft sql tools that is always present on the same machine as the RMA.

Even a "No, this will not work" will be helpful :-)



Regards,

M
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Well, there is no built-in test that can perform such check. You may create some script using VB, Java, Perl or create exe module using any compiler (e.g. C++) and then use your own script to perform the test.
There are 3 test methods allows you to call your own scripts to perform the test:
- Active Script
http://www.ks-soft.net/hostmon.eng/mfra ... htm#script
- Shell Script
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell
- External
http://www.ks-soft.net/hostmon.eng/mfra ... m#execheck

Regards
Alex
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

Manti,
As a new forum user, (from one user to another) Welcome!
Your request intrigues me. Do I understand correctly - you want the agent to produce the XML file? If so, Alex is steering you in the right direction with regard to scripting.

But I'm curious, what you describe sounds like a tracking tool - XML file created and pushed to a 'processing' server, once complete a complimentary push is sent to the originating source.
Unless this XML file is a vital part of the process, (which doesn't sound likely since you are conjuring it up with the monitoring tool) is it possible you could accomplish this by querying the database or log files instead? For instance, maybe a local log file entry triggers a test against a remote log file - if expected result does not occur within x minutes trigger an alarm.
A more direct method like this with fewer dependencies will produce more reliable results.

If you're not giving away any company secrets, maybe you could describe the workflow in a bit more detail. With all the test methods available to you there might be another route. Heck, I'm still learning just how deep you can go with this wonderful tool! :D
Manti
Posts: 4
Joined: Mon Feb 02, 2009 8:06 am

Post by Manti »

Thank you for the replys.

The reason id like to solve this whole problem with hostmonitor alone is because I want to leave as little stuff out on each network as possible. If I can do everything with an RMA rather than making another exe and install, it would be a lot easier and simpler to administer and manage.

The reason why I want the RMA to produce the XML file is because the system that sends it, will send it to another reciever, which in turn process the file, and sends it again to the a 3rd part and so forth. After 4-5 times passing through filesystems, networks, msmq's etc, the end reciever will recieve the file and return a reciept that will find its way back though the several nodes.

The entire system we want to monitor communicates solely through XML exchanges, either by filetransfer, databasetransfer or webservicetransfer depending on which routes it takes. There are different XML files, most are different kinds of data, other are reciepts, and the one I want hostmonitor to replicate is a simple "ping".

Considering your replys, I think It might be best to try to get an automated ping written in the service on the first node that logs the timestamps into a database so I can odbc query it. But since im not in control of that service, there might be some resistance :-)
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

Sounds like an interesting data exchange. Typically I think of AHM as sitting outside of the working processes, observing/measuring the results, and taking action to report/correct a 'bad' or unexpected result. By your description RMA is actively participating in a working process - which is OK too, just different from my way of thinking.

It appears you could still use RMA if you wish. Have you identified a trigger/alarm to initiate the action? Not saying it would ever happen, but what happens to your workflow if the RMA service fails?
Manti
Posts: 4
Joined: Mon Feb 02, 2009 8:06 am

Post by Manti »

I agree with an observer not interfering, and the idea was not to interfer, but work as a ping test, just with XML rather than what you normally mean when you say ping. If the RMA fails, the supervision fails, but the system continues to function normally.

I'm not sure what you mean by having identified a trigger/alarm to initate the action. The test would ofcourse send a ping every X number of minutes.
User avatar
greyhat64
Posts: 246
Joined: Fri Mar 14, 2008 9:10 am
Location: USA

Post by greyhat64 »

I think I'm beginning to understand - at least a bit. Actually not a bad way to track your message routing.
It seems like a script could easily be written to create and deliver the xml file. If you're not familiar with scripting I suggest Tek Tips. It's a free collection of forums, including VBScript, Perl, Powershell, etc. I've found numerous code samples there myself.
Here's one titled: Generating XML document using VB script. (You may need to register/log in first)
Good luck and let us know when you have it working.
Post Reply