### Start IntelligenceHub (Linux Shell) Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/git/example.md Example Linux script to start the IntelligenceHub, setting the deployment file via an environment variable. This method configures the hub at startup based on the specified JSON file. ```shell HIGHBYTE_DEPLOYMENT_FILE=./deployment-settings.json ./start-linux.sh ``` -------------------------------- ### Start Runtime Scripts Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/installation.md Scripts to launch the HighByte Intelligence Hub runtime. Execute the appropriate file for your operating system to start the application and begin logging event messages to the console. ```batch runtime\start-windows.bat ``` ```shell ./start-linux.sh ``` ```shell ./start-macos.sh ``` -------------------------------- ### Start IntelligenceHub (Windows Java Command) Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/git/example.md Example Java command for Windows to start the IntelligenceHub, setting the deployment file via a Java system property. This allows runtime reconfiguration using the specified JSON file. ```java java !JAVA_OPTS! -Dhighbyte.deployment.file="./deployment-settings.json" -jar intelligencehub-runtime.jar ``` -------------------------------- ### Add SAML2 Logging Argument to Windows Start Script Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/administration/saml_and_ad_setup.md This example demonstrates how to integrate the SAML2 logging JVM argument into a Windows start script. It modifies the 'java' command to include the '-Dlogback.configurationFile=logback.xml' option, ensuring that the custom logging configuration is applied when the runtime starts. This allows for persistent advanced logging setup. ```batch java -Dlogback.configurationFile=logback.xml -cp "intelligencehub-runtime.jar;lib/*" com.highbyte.intelligencehub.runtime.Main start ``` -------------------------------- ### Configure Application Data Directory Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/installation.md Example JSON configuration to specify custom locations for application data and store-forward data. This allows for easier product upgrades by separating data from the installation directory. ```json { "settings": { "directories" : { "appData" : "C:\\HighByte\\appData", "storeForwardData" : "C:\\HighByte\\storeForwardData" } } } ``` -------------------------------- ### Certificate File Format Examples Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/administration/certificates.md Examples of the expected content format for X.509 certificates and private keys (PKCS#1, PKCS#8) when uploading via the POM format. Certificates should start with '-----BEGIN CERTIFICATE-----' and private keys with specific markers. ```APIDOC Certificate File Content: - X.509 Certificates: Must begin with `-----BEGIN CERTIFICATE-----` Private Key File Content: - PKCS#1 Private Keys: Must begin with `-----BEGIN RSA PRIVATE KEY-----` - PKCS#8 Private Keys: Must begin with `-----BEGIN PRIVATE KEY-----` or `-----BEGIN ENCRYPTED PRIVATE KEY-----` ``` -------------------------------- ### Instance Initialization Block Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/model/instances.md Shows an example of an initialization block that reads data from a connection and sets default variables, which can then be referenced in expression attributes. ```Configuration/Expression let mesData = {{Connection.mes.machineStatus({"machineid":"10"})}} variables.machineName = mesData.name variables.defaultSpeed = 100 ``` -------------------------------- ### SAML 2.0 Configuration Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/administration/saml_and_ad_setup.md An example JSON configuration for enabling SAML 2.0 authentication, specifying service provider and identity provider details, and security settings. ```JSON { "authentication": { "providers": ["saml2", "internal"], "saml2": { "sp.nameidformat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "sp.entityid": "Intelligence Hub entity id", "sp.assertion_consumer_service.url": "http(s)://host:port/config/login/idp", "idp.entityid": "IDP entity id", "idp.single_sign_on_service.url": "IDP login in URL", "idp.single_sign_on_service.binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", "idp.x509cert": "IDPCertificate", "security.signature_algorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "security.digest_algorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "security.requested_authncontext": "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport", "security.want_assertions_signed": false, "security.authnrequest_signed": false, "security.want_assertions_encrypted": false, "custom.roleNameAttribute" : "roles" } } } ``` -------------------------------- ### Start Intelligence Hub Runtime Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/command_line.md Starts the Intelligence Hub runtime. This command allows for the use of classpath wildcards to support loading custom dependencies. ```Java CLI java -cp "intelligencehub-runtime.jar:lib/*" com.highbyte.intelligencehub.runtime.Main start ``` -------------------------------- ### Expand Arrays Configuration Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/model/instances.md Provides an example configuration for the Expand Arrays feature, mapping specific indices of source arrays to instance attributes for transformation. ```JSON { "time": {{Connection.sql.row}}[0].timestamp, "rpm": {{Connection.sql.row}}[0].value, "model": "myModel" } ``` -------------------------------- ### Dynamic Output Settings Example Payload Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/connect/outputs.md An example of a data payload used to dynamically configure output settings, such as an MQTT topic, by referencing specific fields within the payload. ```JSON { "siteID": "Portland", "areaID": "Engineering", "machineID": "Boiler1" } ``` -------------------------------- ### Install Agent as Windows Service Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/connect/connections/historians/pi_system/pi-system-af-sdk-connector.md Command to install the PI System AF SDK Connector agent as a Windows service using InstallUtil. This utility is part of the .NET Framework installation. ```bash installutil intelligencehub-osisoft.exe ``` -------------------------------- ### Import Namespace CSV Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/namespace.md Provides an example of the CSV format used for importing namespace data. Each line represents a path within the namespace hierarchy. ```csv path site1/area1/line1 site/area1/line2 ``` -------------------------------- ### Import Namespace JSON Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/namespace.md Provides an example of the JSON format used for importing namespace data. It defines an array of objects, each containing a 'path' property. ```json [ { "path": "site1/area1/line1" }, { "path": "site1/area1/line2" } ] ``` -------------------------------- ### Highbyte Smart Query Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/pipeline/stages/io/smart_query.md Demonstrates a query to select instances where the 'speed' attribute is 100 and specifies the output format as a list of values. The example shows the query syntax and the expected JSON output structure. ```HighbyteQuery Select: Boston.Paint.Line1.* Where: *[value.speed = 100] Select: value As: List ``` ```JSON [ { "speed": 100, "state": 50 } ] ``` -------------------------------- ### Smart Query Example: Filter by Model and Select Value/Path/Model Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/pipeline/stages/io/smart_query.md An example demonstrating a complete Smart Query configuration: querying specific instances modeled after 'Conveyor', selecting the value, path, and model, and formatting the output as a list. ```JSONata Select: Boston.Paint.Line1.* Where: *[model = "Conveyor"] Select: value, path, model As: List ``` ```JSON [ { "speed": 100, "state": 50, "_path": "Boston.Paint.Line1.Conveyor", "_model": "Conveyor" } ] ``` -------------------------------- ### Initial Deployment Settings JSON Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/git/example.md Defines the structure for IntelligenceHub deployment settings, specifying Git repository details and fragments. It includes configurations for pulling deployment JSON from a Git repository and referencing local files, with an unencrypted password. ```JSON { "version" : 0, "repos" : [ { "type" : "git", "uri" : "", "name" : "highbyte", "author" : "", "email" : "", "auth" : { "type" : "pass", "password" : "", "username" : "" } } ], "fragments" : [ { "details" : { "type" : "git", "deployFile" : "model-deployment.json", "repoName" : "highbyte", "ref" : "models" }, "keyPaths" : [ ".project.modeling" ] }, { "details" : { "type" : "dir", "deployFile" : "/usr/local/highbyte/deployments/connection-deployment.json" }, "keyPaths" : [ ".project.connections", ".project.inputs", ".project.outputs" ] } ] } ``` -------------------------------- ### Active Directory Configuration Example (JSON) Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/administration/saml_and_ad_setup.md An example JSON configuration file demonstrating how to enable Active Directory login. It includes essential AD settings such as host, port, gateway credentials, domain, SSL configuration, user filters, search bases, and attribute mappings for roles and user information. ```JSON { "authentication": { "providers": ["ad"], "ad": { "host": "localhost", "port": "389", "gatewayUsername": "User", "encryptGatewayPassword": "****", "domain": "domain.com", "ssl": false, "caAlias": "", "userFilter": "(&(objectClass=user)(!(objectClass=computer)))", "searchBase": "dc=domain,dc=com", "suffixGatewayUsername": true, "usernameAttribute": "sAMAccountName", "userRoleAttribute": "memberOf", "roleNameAttribute": "cn", "fullNameAttribute": "name", "phoneAttribute": "telephoneNumber", "emailAttribute": "mail", "smsAttribute": "mobile" } } } ``` -------------------------------- ### System Variables JSON Configuration Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/administration/system_variables.md Example format for the `intelligencehub-systemvariables.json` file. This file allows defining system variables that are loaded when the Intelligence Hub starts, enabling customization for different deployments. ```json [ { "name": "variable_name", "value": "variable_value" } ] ``` -------------------------------- ### Linux systemd Service Configuration Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/installation.md Configuration file and commands for setting up HighByte Intelligence Hub as a systemd service on Linux. This allows the hub to start automatically on system boot. ```shell sudo chmod +x /opt/highbyte/runtime/*-linux.sh ``` ```systemd [Unit] Description=HighByte Intelligence Hub After=network.target [Service] ExecStart=/opt/highbyte/runtime/start-linux.sh ExecStop=/opt/highbyte/runtime/stop-linux.sh WorkingDirectory=/opt/highbyte/ Restart=on-failure [Install] WantedBy=multi-user.target ``` ```apidoc systemctl enable highbyte.service systemctl start highbyte.service systemctl status highbyte.service ``` -------------------------------- ### Example JSON Payload Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/connect/connections/webhook.md An example of a JSON payload that can be received by the webhook, used to demonstrate filtering based on specific attributes. ```json { "Machine" : { "AssetInfo" : { "ID" : "MACH-L1-102", "SN" : "B320-3R821N9-D", "Date" : "2018-09-29" }, "Online" : true, "Utilization" : 40.0 } } ``` -------------------------------- ### Encrypted Deployment Settings JSON Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/git/example.md Illustrates the deployment settings file after the encryption process. The password field is now represented as an encrypted object containing keyId, iv, and ciphertext, enhancing security. ```JSON { "version" : 0, "repos" : [ { "type" : "git", "uri" : "", "name" : "highbyte", "author" : "", "email" : "", "auth" : { "type" : "pass", "password" : { "type" : "Encrypted", "value" : { "keyId" : "AnBU7AXftXCS7+EZNM+9Zw==", "iv" : "gEma6X9PPh38XoqC1dFcew==", "ciphertext" : "dQMlw3rRfzBVrVxfW5a/LQ==" } }, "username" : "" } } ], "fragments" : [ { "details" : { "type" : "git", "deployFile" : "model-deployment.json", "repoName" : "highbyte", "ref" : "models" }, "keyPaths" : [ ".project.modeling" ] }, { "details" : { "type" : "dir", "deployFile" : "/usr/local/highbyte/deployments/connection-deployment.json" }, "keyPaths" : [ ".project.connections", ".project.inputs", ".project.outputs" ] } ] } ``` -------------------------------- ### Event Metadata Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/pipeline/triggers/event.md Example JSON structure for event metadata. This typically includes information about the event's origin and a timestamp. ```json { "source": "Connection.mqtt.out", "timestamp": "2024-06-24T13:54:07.606Z" } ``` -------------------------------- ### Example Model Definition Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/pipeline/stages/common/model_validtion.md An example of a model definition structure used for validation. It specifies attribute names, types, and requirements. ```json { "name": "Motor", "attributes": [ { "name": "pressure", "attributeType": "Internal", "internalType": "Real64" }, { "name": "speed", "attributeType": "Internal", "internalType": "Int32" }, { "name": "state", "attributeType": "Internal", "internalType": "Boolean" }, { "name": "locator", "attributeType": "Internal", "internalType": "String", "required": true } ] } ``` -------------------------------- ### Event Values Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/pipeline/triggers/event.md Example JSON structure representing the values of an event. It includes attributes with different data types such as strings and numbers. ```json { "attr1": "value of the event", "attr2": 2 } ``` -------------------------------- ### Install AspenTech IP.21 Agent as Windows Service Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/connect/connections/historians/aspentech_ip_21/agent.md Demonstrates the command to install the AspenTech IP.21 Agent executable as a Windows service using the InstallUtil utility. This utility is part of the .NET Framework installation. ```shell installutil intelligencehub-ip21.exe ``` -------------------------------- ### Internal Authentication Configuration Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/administration/saml_and_ad_setup.md Example configuration file to enable login using locally defined user accounts. This JSON structure specifies the authentication providers to be used by the system. ```json { "authentication": { "providers": ["internal"] } } ``` -------------------------------- ### Export Deployment Configuration Command Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/git/example.md Shows how to use the `export` command to save the current IntelligenceHub instance configuration to a specified file path. If no path is provided, it defaults to `intelligencehub-deployment.json` in the working directory. ```APIDOC java -jar intelligencehub-runtime.jar export /usr/local/highbyte/deployments/connection-deployment.json ``` -------------------------------- ### MQTT Include Topic Example Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/connect/connections/mqtt.md Demonstrates the payload structure when the 'Include Topic' setting is enabled for an MQTT input. ```json { "_topic": "deviceid", "value": { "deviceid": "press1", "other": 10 } } ``` -------------------------------- ### Encrypt Deployment Settings Command Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/git/example.md Demonstrates the command-line usage to encrypt sensitive information, such as tokens, within a deployment settings JSON file. This command modifies the file in place, encrypting the password field. ```APIDOC java -jar intelligencehub-runtime.jar encrypt deployment-settings.json ``` -------------------------------- ### Example Event Value Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/pipeline/stages/common/model_validtion.md An example of an event value structure used for model validation. It includes attributes like pressure, speed, state, and locator. ```json { "pressure": 10.1, "speed": 90, "state": true, "locator": "line1" } ``` -------------------------------- ### Example Historical Data Read Configuration Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/configuration/connect/connections/historians/pi_system.md An example configuration demonstrating how to read historical data over a 100-day period, with data samples taken every 5 minutes, and each read request fetching one day's worth of data. ```APIDOC Example Configuration: Start Time = *-100d End Time = * Interval = 5m Index = true Window Size = 1d ``` -------------------------------- ### Configuration State Files Source: https://github.com/bubtheengineer/highbyte_documentation/blob/main/setup/installation/application_state.md Lists the files that constitute the Intelligence Hub's configuration state, including project configuration, certificate store, user data, event logs, cache, and backups. ```APIDOC appData/intelligencehub-configuration.json - The project configuration for the Intelligence Hub (e.g., connections, models, pipelines, etc.) stored as JSON. appData/intelligencehub-certificatestore.pkcs12 - Certificate store that contains the keys for encrypting passwords in the `intelligencehub-configuration.json` file. appData/intelligencehub-users.json - Contains local users, password hashes, roles and claims settings. appData/intelligencehub-events.db - Event log files stored in an encrypted SQLite format. appData/intelligencehub-events.log - Event log files stored in a JSON based text format. appData/intelligencehub-cache.db - Cached state of connections in the Intelligence Hub (e.g., SQL indexed query, getting only data newer than a certain date, etc.). appData/intelligencehub-writestore-CONECTIONNAME.db - Store and forward file for a specific connection (only present when store and forward is enabled on the connection). appData/backups/* - A folder containing automatic backups of the `intelligencehub-configuration.json`. Snapshots are added anytime the configuration is modified. ```