### GET /topologies response example Source: https://docs.moogsoft.com/v9/en/-topologies.html Example response from a successful GET request, showing an array of JSON objects with name, description, and active properties for each topology. ```json [ { "name": "host", "description": "Host-based topology", "active": true }, { "name": "location", "description": "Location-based topology", "active": true } ] ``` -------------------------------- ### Start patch installation Source: https://docs.moogsoft.com/v9/en/patch-moogsoft-onprem-tarball-for-v9-0-0-x.html Extracts the tarball and runs the installation script from the patch_directory9.0.0.2 directory. ```bash cd patch_directory9.0.0.2; tar -xf moogsoft-enterprise-9.0.0.2.tgz; bash moogsoft-enterprise-install-9.0.0.2.sh; ``` -------------------------------- ### Start patch installation Source: https://docs.moogsoft.com/v9/en/patch-moogsoft-onprem-tarball-for-v9-1-0-x.html Extracts the patch tarball and runs the installer script. Must be run from an empty directory named patch_directory9.1.0. ```bash cd patch_directory9.1.0; tar -xf moogsoft-enterprise-9.1.0.tgz; bash moogsoft-enterprise-install-9.1.0.sh; ``` -------------------------------- ### Start patch installation Source: https://docs.moogsoft.com/v9/en/patch-moogsoft-onprem-tarball-for-v9-1-1-x.html Place the downloaded tarball into an empty directory named 'patch_directory 9.1.1' and run these commands to extract and install the patch. ```bash cd patch_directory9.1.1; tar -xf moogsoft-enterprise-9.1.1.tgz; bash moogsoft-enterprise-install-9.1.1.sh; ``` -------------------------------- ### GET response example for /topologies/{topologyName}/links/{nodeName} Source: https://docs.moogsoft.com/v9/en/-topologies--topologyname--links--nodename-.html Example JSON response returning the links for 'node2'. Each link includes a description, sourceNode, and sinkNode. ```json [ { "description": "link1", "sourceNode": "node2", "sinkNode": "node1" }, { "description": "link2", "sourceNode": "node2", "sinkNode": "node3" } ] ``` -------------------------------- ### Example Run of Table Compression Utility with Output Source: https://docs.moogsoft.com/v9/en/table-compression-utility.html Example invocation of the utility with sample arguments and its full output, showing the table compression process including table creation, row copying, and table swapping. ```bash $MOOGSOFT_HOME/bin/utils/moog_snapshots_online_table_change.sh -H localhost -P 3306 -d historic_moogdb -u root -p Password123 No slaves found. See --recursion-method if host ldev11 has slaves. Not checking slave lag because no slaves were found and --check-slave-lag was not specified. Operation, tries, wait: analyze_table, 10, 1 copy_rows, 10, 0.25 create_triggers, 10, 1 drop_triggers, 10, 1 swap_tables, 10, 1 update_foreign_keys, 10, 1 Altering `moogdb`.`snapshots`... Creating new table... Created new table moogdb._snapshots_new OK. Altering new table... Altered `moogdb`.`_snapshots_new` OK. 2019-07-12T15:47:49 Creating triggers... 2019-07-12T15:47:49 Created triggers OK. 2019-07-12T15:47:49 Copying approximately 36064233 rows... Copying `moogdb`.`snapshots`: 0% 03:05:15 remain Copying `moogdb`.`snapshots`: 0% 02:56:29 remain Copying `moogdb`.`snapshots`: 0% 02:50:16 remain Copying `moogdb`.`snapshots`: 1% 02:53:31 remain Copying `moogdb`.`snapshots`: 1% 02:54:20 remain Copying `moogdb`.`snapshots`: 1% 02:58:53 remain Copying `moogdb`.`snapshots`: 1% 02:59:46 remain Copying `moogdb`.`snapshots`: 2% 03:03:08 remain ….. ….. Copying `moogdb`.`snapshots`: 94% 09:07 remain Copying `moogdb`.`snapshots`: 94% 08:37 remain Copying `moogdb`.`snapshots`: 94% 08:06 remain Copying `moogdb`.`snapshots`: 95% 07:40 remain Copying `moogdb`.`snapshots`: 95% 07:07 remain Copying `moogdb`.`snapshots`: 95% 06:37 remain Copying `moogdb`.`snapshots`: 96% 06:06 remain Copying `moogdb`.`snapshots`: 96% 05:36 remain Copying `moogdb`.`snapshots`: 96% 05:05 remain Copying `moogdb`.`snapshots`: 97% 04:35 remain Copying `moogdb`.`snapshots`: 97% 04:05 remain Copying `moogdb`.`snapshots`: 97% 03:33 remain Copying `moogdb`.`snapshots`: 98% 03:02 remain Copying `moogdb`.`snapshots`: 98% 02:32 remain Copying `moogdb`.`snapshots`: 98% 02:01 remain Copying `moogdb`.`snapshots`: 99% 01:29 remain Copying `moogdb`.`snapshots`: 99% 00:58 remain Copying `moogdb`.`snapshots`: 99% 00:26 remain 2019-07-12T19:28:57 Copied rows OK. 2019-07-12T19:28:57 Analyzing new table... 2019-07-12T19:28:57 Swapping tables... 2019-07-12T19:28:57 Swapped original and new tables OK. 2019-07-12T19:28:57 Dropping old table... 2019-07-12T19:29:05 Dropped old table `moogdb`.`_snapshots_old` OK. 2019-07-12T19:29:05 Dropping triggers... 2019-07-12T19:29:05 Dropped triggers OK. Successfully altered `moogdb`.`snapshots`. ``` -------------------------------- ### Install Moogsoft AIOps with installation script Source: https://docs.moogsoft.com/v9/en/basic-ha-installation---tarball.html Installs Moogsoft AIOps on the secondary and redundancy servers. When prompted, enter the directory to install AIOps, for example /opt/moogsoft/aiops. The script guides you through the installation process and you can modify the default installation directory. ```bash bash moogsoft-aiops-install-${VERSION}.sh ``` -------------------------------- ### Create and install server certificates Source: https://docs.moogsoft.com/v9/en/configure-weblogic.html Run these keytool commands to generate and install the server certificates. The commands create a server keystore, generate a certificate request, generate a certificate using the root CA, and import the certificates into the server keystore and truststore. ```bash cd .. cd serverstore keytool -genkeypair -keystore server.jks -storepass welcome1 -alias 100bytesServer -keypass welcome1 -keyalg RSA keytool -certreq -keystore server.jks -storepass welcome1 -alias 100bytesServer -keypass welcome1 -file 100bytesServer.csr -v keytool -gencert -alias rootca -keypass welcome1 -keystore ../castore/castore.jks -storepass welcome1 -ext BC=2 -rfc -infile 100bytesServer.csr -outfile 100bytesServer.cer keytool -importcert -alias rootca -keypass welcome1 -keystore server.jks -storepass welcome1 -file ../castore/rootca.cer keytool -importcert -alias 100bytesServer -keypass welcome1 -keystore server.jks -storepass welcome1 -file 100bytesServer.cer keytool -importcert -alias rootca -keypass welcome1 -keystore servertruststore.jks -storepass welcome1 -file ../castore/rootca.cer ``` -------------------------------- ### cURL request to get first 10 resolving thread entries Source: https://docs.moogsoft.com/v9/en/getresolvingthreadentries.html Example cURL request to return the first 10 resolving thread entries in Situation 358, using start and limit parameters. ```bash curl -G -u graze:graze -k -v "https://localhost/graze/v1/getResolvingThreadEntries" \ --data-urlencode "sitn_id=358" \ --data-urlencode "start=0" \ --data-urlencode "limit=10" ``` -------------------------------- ### Create and install client certificates Source: https://docs.moogsoft.com/v9/en/configure-weblogic.html Run these keytool commands in the castore directory to generate and install the client certificates. The commands create a keystore, generate a certificate request, generate a certificate, and import it into a truststore. ```bash cd castore keytool -genkeypair -keystore castore.jks -storepass welcome1 -alias rootca -keypass welcome1 -keyalg RSA keytool -certreq -keystore castore.jks -storepass welcome1 -alias rootca -keypass welcome1 -file rootca.csr -v keytool -gencert -alias rootca -keypass welcome1 -keystore castore.jks -storepass welcome1 -ext BC=2 -rfc -infile rootca.csr -outfile rootca.cer keytool -importcert -alias rootca -keypass welcome1 -keystore catruststore.jks -storepass welcome1 -file rootca.cer ``` -------------------------------- ### Example GET request for integration ID 2 Source: https://docs.moogsoft.com/v9/en/using-the-integration-api-to-configure-the-filter-matcher.html Example GET request to retrieve the configuration for the Filter Matcher integration with ID 2. ```http GET : https:///integrations/api/v1/integrations/2 ``` -------------------------------- ### topology_loader example command Source: https://docs.moogsoft.com/v9/en/topology-loader-utility-command-reference.html Example command that loads nodes and links from physical_topology.csv into the physical topology on host example.com in batches of 15,000. ```bash topology_loader -b=15000 --credentials=phil:password123 -f=physical_topology.csv --hostname=example.com -t=physical ``` -------------------------------- ### Run Percona install script Source: https://docs.moogsoft.com/v9/en/rpm-installation.html Runs the Percona installation script. The script guides you through the installation process. ```bash bash install_percona_nodes.sh; ``` -------------------------------- ### Example Integrations Controller configuration Source: https://docs.moogsoft.com/v9/en/integrations-controller.html Shows a complete example of the controller.conf file with all fields set, including JWT and external proxy settings. ```json { "identifier" : "dc9873f4_309c_4ab4_9e00_96ddfdfedecc", "host" : "0.0.0.0", "port" : 8086, "start_internal_broker" : true, "webhost": "https://localhost", "moogsvr_host": "http://localhost:8085", "port_range_min": 50000, "port_range_max": 51000, "jwt" : { "secret_key" : "/9MiQ5gA+WKV1vp/Fo96fbZdQBY4IEh/TL4RbqPRF6M=", "broker_init_token_days_to_live" : 7, "token_leeway_seconds" : 60 }, "external_proxy": { "host" :"localhost", "port" :8888, "username":"user", "encrypted_password":"e5uO0LY3HQJZCltG/caUnVbxVN4hImm4gIOpb4rwpF4=" } } ``` -------------------------------- ### Start MID server Source: https://docs.moogsoft.com/v9/en/configure-a-servicenow-mid-server.html Starts the ServiceNow MID server. Run this command after configuration. ```bash /usr/local/servicenow/moog_mid_server/agent/bin/mid.sh start ``` -------------------------------- ### OpenSearch fails to start with /tmp permission error - example error Source: https://docs.moogsoft.com/v9/en/troubleshoot-the-ui.html Example error output when OpenSearch fails to start due to /tmp directory permission problems, showing the java.lang.UnsatisfiedLinkError. ```log [2017-08-07T14:14:31,173][WARN ][o.o.b.Natives ] [master1] unable to load JNA native support library, native methods will be disabled. java.lang.UnsatisfiedLinkError: /tmp/opensearch-1073614746573548365/jna9916496385695771284.tmp: /tmp/opensearch-1073614746573548365/jna9916496385695771284.tmp: failed to map segment from shared object at jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?] at jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383) ~[?:?] at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227) ~[?:?] at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169) ~[?:?] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2407) ~[?:?] at java.lang.Runtime.load0(Runtime.java:747) ~[?:?] at java.lang.System.load(System.java:1857) ~[?:?] at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018) ~[jna-5.5.0.jar:5.5.0 (b0)] at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988) ~[jna-5.5.0.jar:5.5.0 (b0)] at com.sun.jna.Native.(Native.java:195) ~[jna-5.5.0.jar:5.5.0 (b0)] at java.lang.Class.forName0(Native Method) ~[?:?] at java.lang.Class.forName(Class.java:377) ~[?:?] at org.opensearch.bootstrap.Natives.(Natives.java:58) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:123) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:191) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:412) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:178) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:169) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) [opensearch-cli-1.3.6.jar:1.3.6] at org.opensearch.cli.Command.main(Command.java:101) [opensearch-cli-1.3.6.jar:1.3.6] at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:135) [opensearch-1.3.6.jar:1.3.6] at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:101) [opensearch-1.3.6.jar:1.3.6] ``` -------------------------------- ### Run moog_init_ui.sh on UI 1 Source: https://docs.moogsoft.com/v9/en/set-up-the-user-interface-role-for-ha.html Initialize the UI stack on UI 1. Substitute the RabbitMQ zone and Core 1 server hostname for the placeholders. ```bash moog_init_ui.sh -twfz -c :15672 -m :5672 -s :9200 -d :3309 -n ``` -------------------------------- ### Initialize the database on the primary server Source: https://docs.moogsoft.com/v9/en/basic-ha-installation---rpm.html Run these commands on the primary server to install Percona nodes and initialize the database. Substitute the IP addresses of your servers and press Enter at the password prompt during initialization. ```bash bash install_percona_nodes.sh -p -i ,, moog_init_db.sh -qIu root ``` -------------------------------- ### Install Java and Crontab for RPM Installation Source: https://docs.moogsoft.com/v9/en/create-a-broker.html Run this command on an RPM installation to install Java v11.0.6 and crontab, satisfying the prerequisites for broker installation. It also initializes crontab and starts the cron daemon. ```bash yum install -y cronie java-11-openjdk-devel*11.0.6* && echo "" | crontab - && crond start ``` -------------------------------- ### Get Events Analyser Config Response Example Source: https://docs.moogsoft.com/v9/en/geteventsanalyserconfig.html Example JSON response from the Get Events Analyser Config API. It shows the full configuration object with global settings and partition overrides for SOURCE11 and SOURCE22. ```json { "priority_words": true, "partition_by": "source", "stop_word_length": 0, "stemming_language": "english", "partition_overrides": { "SOURCE11": { "stop_words": false, "priority_words": false, "fields": [ "description" ], "casefold": true, "stop_word_length": 5 }, "SOURCE22": { "priority_words_list": [ "reboot", "shutdown" ], "stop_words": true, "stop_words_list": [ "france", "germany", "italy", "peru", "india", "japan", "korea" ], "stemming": true, "priority_words": true, "stop_word_length": 1, "mask": { "date_time": false, "ip_address": true } } }, "priority_words_list": [ "down", "fail", "loss", "low" ], "stop_words": true, "stop_words_list": [ "%", ":", "=", ".", "|", "-", "~", "&", "a", "able", "about", "across", "after", "all", "almost", "also", "am", "among", "an", "and", "any", "are", "as", "at", "be", "because", "been", "but", "by", "can", "cannot", "could", "dear", "did", "do", "does", "either", "else", "ever", "every", "for", "from", "get", "got", "had", "has", "have", "he", "her", "hers", "him", "his", "how", "however", "i", "if", "in", "into", "is", "it", "its", "just", "least", "let", "like", "likely", "may", "maybe", "me", "might", "most", "must", "my", "neither", "no", "nor", "not", "of", "off", "often", "on", "only", "or", "other", "our", "own", "rather", "said", "say", "says", "she", "should", "since", "so", "some", "than", "that", "the", "their", "them", "then", "there", "these", "they", "this", "tis", "to", "too", "twas", "us", "wants", "was", "we", "were", "what", "when", "where", "which", "while", "who", "whom", "why", "will", "with", "would", "yet", "you", "your" ], "stemming": false, "id": 1, "casefold": true, "fields": [ "description" ], "mask": { "path": false, "number": true, "date_time": true, "mac_address": false, "guid": false, "hex": false, "oid": false, "ip_address": false, "stop_word": false, "word": false, "url": false, "email": false } } ``` -------------------------------- ### Install MID server as daemon Source: https://docs.moogsoft.com/v9/en/configure-a-servicenow-mid-server.html Optionally installs the MID server as a daemon and adds auto-start scripts to init.d. Run as root. ```bash /usr/local/servicenow/moog_mid_server/agent/bin/mid.sh install ``` -------------------------------- ### Install and verify ServiceNow MID Server on Linux Source: https://docs.moogsoft.com/v9/en/servicenow-management.html Install the MID Server RPM, run the installer script, and verify the service status. The installer requires a non-root user for the MID Server to run as. The systemctl status command should show the service as active (running). ```bash rpm -ivh --nodeps --prefix=/usr/local/servicenow/moog_mid_server ``` ```bash /usr/local/servicenow/moog_mid_server/agent/installer.sh ``` ```bash # systemctl status mid ● mid.service - ServiceNow_MID_Server Loaded: loaded (/etc/systemd/system/mid.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2022-05-26 11:49:26 EDT; 18min ago Process: 4143 ExecStart=/usr/local/servicenow/moog_mid_server/agent/bin/mid.sh start sysd (code=exited, status=0/SUCCESS) Main PID: 4232 (wrapper-linux-x) ``` -------------------------------- ### Request example for getUserSessionInfo Source: https://docs.moogsoft.com/v9/en/getusersessioninfo-264511.html Example request to return ten records of session information for username "graze", starting from the second session. Uses the moogdb.getUserSessionInfo method with a UserMap object containing username, from, to, start, and limit. ```javascript var UserMap = {"username":"graze", "from":1570544146, "to":1570700529, "start":2, "limit":10}; var SessionInfo = moogdb.getUserSessionInfo(UserMap); logger.warning("getUserSessionInfo with username, start, limit, from and to ..."+ JSON.stringify(SessionInfo)); ``` -------------------------------- ### Start and end character configuration Source: https://docs.moogsoft.com/v9/en/tokenize-source-event-data.html Defines the start and end characters for tokenization. In this example, no start character is defined and a newline (\n) is the end character, so each line is treated as one event. ```yaml start: [], end: ["\n"], ``` -------------------------------- ### Initialize UI on Secondary Server Source: https://docs.moogsoft.com/v9/en/basic-ha-installation---rpm.html Run the initialization script on the secondary server. Substitute the RabbitMQ zone. Answer 'yes' to change the configuration hostname and enter the public URL. ```bash moog_init_ui.sh -twfz MY_ZONE -c :15672 -m :5672 -s :9200 -d :3309 -n ``` -------------------------------- ### Start WildFly Server from bin Directory Source: https://docs.moogsoft.com/v9/en/configure-jboss--wildfly-.html Start the WildFly server with the modified standalone-full.xml configuration. Use the -b and -bmanagement flags to bind to all interfaces. ```bash ./standalone.sh -c standalone-full.xml -b=0.0.0.0 -bmanagement=0.0.0.0 ``` -------------------------------- ### Run Moogsoft Onprem installation script Source: https://docs.moogsoft.com/v9/en/basic-ha-installation---tarball.html Runs the installation script in the primary server working directory. When prompted, enter the working directory to install Moogsoft Onprem (for example, /opt/moogsoft/aiops). ```bash bash moogsoft-enterprise-install-${VERSION}.sh ``` -------------------------------- ### Enable and start RabbitMQ service Source: https://docs.moogsoft.com/v9/en/message-system-deployment.html Enable RabbitMQ to start on boot and start the service. ```bash chkconfig rabbitmq-server on service rabbitmq-server start ``` -------------------------------- ### Start MySQL node on database-only node Source: https://docs.moogsoft.com/v9/en/percona-cluster-8-0-tarball-minor-version-upgrade.html Starts the MySQL node normally on a database-only node (no Moogsoft Onprem components installed). ```bash (mysqld_safe > /dev/null 2>/dev/null)& ``` -------------------------------- ### Enable queue mirroring with example zone MoogsoftAIOps Source: https://docs.moogsoft.com/v9/en/message-system-deployment.html Example of enabling queue mirroring when the zone is set to MoogsoftAIOps. ```bash rabbitmqctl set_policy -p MoogsoftAIOps qq-overrides ".+\.HA" '{"delivery-limit": -1}' --apply-to "quorum_queues" ``` -------------------------------- ### Example log output for getActiveMoolets Source: https://docs.moogsoft.com/v9/en/expose-active-moolets.html Shows a sample log line produced by the previous example, listing active Moolets. ```log WARN : [3:AlertBuilder][20190301 19:05:20.808 +0000] [AlertBuilder.js:128] +|Moolets running are: [MaintenanceWindowManager, TeamsMgr, AlertBuilder, SituationWorkflows, Housekeeper, Default Cookbook, Indexer, EnrichmentWorkflows, AlertWorkflows, EventWorkflows, SituationMgr, SituationRootCause]|+ ```