• Blog
  • Info Support
  • Career
  • Training
  • International Group
  • Info Support
  • Blog
  • Career
  • Training
  • International Group
  • Search
logo InfoSupport
  • Latest blogs
  • Popular blogs
  • Experts
      • All
      • Bloggers
      • Speakers
  • Meet us
  • About us
    • nl
    • en
    • .NET
    • 3D printing
    • Advanced Analytics
    • Agile
    • Akka
    • Alexa
    • Algorithms
    • Api's
    • Architectuur
    • Artificial Intelligence
    • ATDD
    • Augmented Reality
    • AWS
    • Azure
    • Big Data
    • Blockchain
    • Business Intelligence
    • Chatbots
    • Cloud
    • Code Combat
    • Cognitive Services
    • Communicatie
    • Containers
    • Continuous Delivery
    • CQRS
    • Cyber Security
    • Dapr
    • Data
    • Data & Analystics
    • Data Science
    • Data Warehousing
    • Databricks
    • DataOps
    • Developers life
    • DevOps
    • Digital Days
    • Digital Twin
    • Docker
    • eHealth
    • Enterprise Architecture
    • Event Sourcing
    • Hacking
    • Infrastructure & Hosting
    • Innovatie
    • Integration
    • Internet of Things
    • Java
    • Machine Learning
    • Microservices
    • Microsoft
    • Microsoft Bot Framework
    • Microsoft Data Platform
    • Mobile Development
    • Mutation Testing
    • Open source
    • Pepper
    • Power BI
    • Privacy & Ethiek
    • Python
    • Quality Assistance & Test
    • Quality Assurance & Test
    • Requirements Management
    • Scala
    • Scratch
    • Security
    • SharePoint
    • Software Architecture
    • Software development
    • Software Factory
    • SQL Server
    • SSL
    • Start-up
    • Startup thinking
    • Stryker
    • Test Quality
    • Testing
    • TLS
    • TypeScript
    • Various
    • Web Development
    • Web-scale IT
    • Xamarin
    • All
    • Bloggers
    • Speakers
Home » Testing and developing MOM scripts outside MOM.
  • Testing and developing MOM scripts outside MOM.

    • By Oud-medewerkers
    • Various 16 years ago
    • Various 0 comments
    • Various Various
    Testing and developing MOM scripts outside MOM.

    Testing and developing  MOM scripts outside MOM.

     

    Here’s a simple and good working solution to test and develop your mom scripts without buying MP studio enterprise.

     

    1)      Install Visual studio 2003 or Visual studio 2005

    2)      Install the “responsetest.exe”  from the “MOM resource tool kit 2005 sp1”

    3)      Create a “empty” solution as “test mom scripts”

    (and you would add it to sourcesafe also 😉 )

    4)      Create a “empty” project as “mom vbs”

    5)      Add a new “vbscript” item , name it “test1.vbs”

    Fill it with  example code:

     

    set oEvent = ScriptContext.CreateEvent

    oEvent.EventNumber = 1

    oEvent.EventSource = “SampleScript.txt”

    oEvent.Message = “This is a event. Prameter is :” & ScriptContext.Parameters.Get(“Test Param”)

    ScriptContext.Submit oEvent

     

    6)      Create a file “test.cmd” in the project directory

    Fill it with the batch code: (make sure your path to the responsetest.exe is correct)

     

    ::  Enter the name below of the script your editing (NO .vbs !)

    set MOM_SCRIPT=test1

     

    set MOM_RESPONSE=%MOM_SCRIPT%_RESPONSE.xml

    set MOM_CONFIG=%MOM_SCRIPT%_Config.xml

    “C:Program FilesMicrosoft Operations Manager Resource KitToolsResponse Test UtilityResponseTest.exe” /q /d /out:%MOM_RESPONSE% /script:%MOM_SCRIPT%.vbs /config:%MOM_CONFIG%

    7)      Add the existing item file “test.cmd” to the project.

    8)      Add an new XML Item named “test1_CONFIG.XML”

    Fill it with the parameter info that will be used for calling the mom script.

     

         


                     


                     


                                  Test


                     


         

     

    9)      Now edit the “mom vbs” project properties.

    ·        Click the “configuration manager”

    ·        Create a new configuration. Name it “MOM response via test.cmd”. then close.

    ·        Under “common properties” change the “output type” to “class library” . then Apply

    ·        Under “Debugging” change the “start application” to “c:windowssystem32cmd.exe”. then apply

    ·        Under “Debugging” change the “command line Arguments” to “/t test.cmd”. then apply an OK.

     

    If you done this all you can now press F5 and it will run the test1.vbs code. The output is stored in the directory where you installed the responsetest.exe and is named “test1_RESPONSE.xml”. Drag this file into your project and set the view mode to DATA. Now you will see all the events (1) that the MOM script “test1.vbs” will create if it runs in MOM.

     

    !!!! Be aware that all vb code is executed in real. Only the mom events / performance events are simulated !!!!!!!

     

    see also: http://www.microsoft.com/technet/scriptcenter/topics/mom/mom3.mspx

     

    Here some action screen shots:

     

    Editing the MP:

     

    Editing the parameters: 

     

    Viewing the results: 

     

     

     

     

     

    Share this

Oud-medewerkers

View profile

IT Training at Info Support

Which training fits you?

Consultancy

Consultancy

Related blogs

  • Video Conferencing en OBS Studio koppelen: online prese…

    Video Conferencing en OBS Studio koppelen: online prese… Maaike Brouwer - 2 years ago

  • Verantwoordelijkheid pakken in jouw eigen persoonlijke …

    Verantwoordelijkheid pakken in jouw eigen persoonlijke … Stephan Versteegh - 2 years ago

  • Tips voor als je gaat afstuderen

    Tips voor als je gaat afstuderen Bart Renders - 3 years ago

Data Discovery Channel

  • MLOps

  • Explainable AI - Break open the blackbox

  • Toekomstvaste microservice data architecturen

Nieuwsbrief

* verplichte velden

Contact

  • Head office NL
  • Kruisboog 42
  • 3905 TG Veenendaal
  • T +31 318 552020
  • Call
  • Mail
  • Directions
  • Head office BE
  • Generaal De Wittelaan 17
  • bus 30 2800 Mechelen
  • T +32 15 286370
  • Call
  • Mail
  • Directions

Follow us

  • Twitter
  • Facebook
  • Linkedin
  • Youtube

Newsletter

Sign in

Extra

  • Media Library
  • Disclaimer
  • Algemene voorwaarden
  • ISHBS Webmail
  • Extranet
Beheer cookie toestemming
Deze website maakt gebruik van Functionele en Analytische cookies voor website optimalisatie en statistieken.
Functioneel Always active
De technische opslag of toegang is strikt noodzakelijk voor het legitieme doel het gebruik mogelijk te maken van een specifieke dienst waarom de abonnee of gebruiker uitdrukkelijk heeft gevraagd, of met als enig doel de uitvoering van de transmissie van een communicatie over een elektronisch communicatienetwerk.
Voorkeuren
De technische opslag of toegang is noodzakelijk voor het legitieme doel voorkeuren op te slaan die niet door de abonnee of gebruiker zijn aangevraagd.
Statistieken
De technische opslag of toegang die uitsluitend voor statistische doeleinden wordt gebruikt. De technische opslag of toegang die uitsluitend wordt gebruikt voor anonieme statistische doeleinden. Zonder dagvaarding, vrijwillige naleving door uw Internet Service Provider, of aanvullende gegevens van een derde partij, kan informatie die alleen voor dit doel wordt opgeslagen of opgehaald gewoonlijk niet worden gebruikt om je te identificeren.
Marketing
De technische opslag of toegang is nodig om gebruikersprofielen op te stellen voor het verzenden van reclame, of om de gebruiker op een website of over verschillende websites te volgen voor soortgelijke marketingdoeleinden.
Manage options Manage services Manage vendors Read more about these purposes
Voorkeuren
{title} {title} {title}