diff options
25 files changed, 526 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Diagnostics Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Diagnostics Table.kql new file mode 100644 index 000000000..d7423cc25 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Diagnostics Table.kql @@ -0,0 +1,272 @@ +.create table DiagnosticsTable ( + SerialNumber: string, + MachineType: string, + Environment: string, + Organization: string, + Site: string, + CreatedTime: datetime, + UploadTime: datetime, + Dancer1Angle:real, + Dancer2Angle:real, + Dancer3Angle:real, + FeederMotorFrequency:real, + DryerMotor:real, + PollerMotor:real, + WinderMotor:real, + ScrewMotor:real, + ThreadSpeed:real, + MixerTemperature:real, + HeadZone1Temperature:real, + HeadZone2Temperature:real, + HeadZone3Temperature:real, + HeadAirFlow:real, + FeederTension:real, + PullerTension:real, + DryerZone1Temperature:real, + DryerZone2Temperature:real, + DryerZone3Temperature:real, + DryerAirFlow:real, + WinderTension:real, + DispensersMotorsFrequency:dynamic, + DispensersAngularEncoders:dynamic, + DispensersLinearPositions:dynamic, + DispensersPressure:dynamic, + FilterDeltaPressure:real, + ChillerTemperature:real, + Dispenser1MotorFrequency:real, + Dispenser2MotorFrequency:real, + Dispenser3MotorFrequency:real, + Dispenser4MotorFrequency:real, + Dispenser5MotorFrequency:real, + Dispenser6MotorFrequency:real, + Dispenser7MotorFrequency:real, + Dispenser8MotorFrequency:real, + HeadZone4Temperature:real, + HeadZone5Temperature:real, + HeadZone6Temperature:real, + BlowerVoltage:real, + Dispenser1Pressure:real, + Dispenser2Pressure:real, + Dispenser3Pressure:real, + Dispenser4Pressure:real, + Dispenser5Pressure:real, + Dispenser6Pressure:real, + Dispenser7Pressure:real, + Dispenser8Pressure:real, + MidTank1Level:real, + MidTank2Level:real, + MidTank3Level:real, + MidTank4Level:real, + MidTank5Level:real, + MidTank6Level:real, + MidTank7Level:real, + MidTank8Level:real, + DrierZone1HeaterCurrent:real, + DrierZone2HeaterCurrent:real, + HeadZone1HeaterCurrent:real, + HeadZone2HeaterCurrent:real, + HeadZone3HeaterCurrent:real, + HeadZone4HeaterCurrent:real, + HeadZone56HeaterCurrent:real, + Mixer1HeaterCurrent:real, + DispensersInkLevel:dynamic, + MidTanksInkLevel:dynamic, + OverallTemperature:real, + HeadZone7HeaterCurrent:real, + HeadZone7Temperature:real, + HeadZone8HeaterCurrent:real, + HeadZone8Temperature:real, + HeadZone9HeaterCurrent:real, + HeadZone9Temperature:real, + HeadZone10HeaterCurrent:real, + HeadZone10Temperature:real, + HeadZone11HeaterCurrent:real, + HeadZone11Temperature:real, + HeadZone12HeaterCurrent:real, + HeadZone12Temperature:real, + HeadBlowerVoltage1:real, + HeadBlowerVoltage2:real, + HeadCoverHeater1Current:real, + HeadCoverHeater1Temperature:real, + HeadCoverHeater2Current:real, + HeadCoverHeater2Temperature:real, + WHSBlower2Voltage:real, + GasSensor:real, + IncomingVoltage:real, + WasteLevel:real, + HeadBlower1AirFlow:real, + HeadBlower2AirFlow:real, + ShinkoSetValue:real, + ShinkoCurrentValue:real, + TotalWHSFlow:real, + EuWinder1Dancer:real, + EuWinder2Dancer:real, + EuWinder3Dancer:real, + EuWinder4Dancer:real, + EuWinder1Motor:real, + EuWinder2Motor:real, + EuWinder3Motor:real, + EuWinder4Motor:real, + EuDryerMotorVelocity:real, + EuDryerMotorTargetVelocity:real, + EuDryerMotorCurrent:real, + EuPullerDancer:real, + EuPullerMotor:real, + EuDryerZone1Temperature:real, + EuDryerZone2Temperature:real, + EuDryerZone3Temperature:real, + EuHeadZone1Temperature:real, + EuHeadZone2Temperature:real, + EuHeadZone3Temperature:real, + EuMixerTemperature:real, + EuTunnelTemperature:real, + EuLubricantTemperature:real, + EuAmbientTemperature:real, + EuElectricalCabinetTemperature:real, + EuDryerZone1Current:real, + EuDryerZone2Current:real, + EuDryerZone3Current:real, + EuHeadZone1Current:real, + EuHeadZone2Current:real, + EuHeadZone3Current:real, + EuMixerCurrent:real, + EuTunnelCurrent:real, + EuLubricantCurrent:real, + EuBtsr1Speed:real, + EuBtsr1SpeedAv:real, + EuBtsr1DispAv:real, + EuBtsr1PeakMin:real, + EuBtsr1PeakMax:real, + EuBtsr2Speed:real, + EuBtsr2SpeedAv:real, + EuBtsr2DispAv:real, + EuBtsr2PeakMin:real, + EuBtsr2PeakMax:real, + EuBtsr3Speed:real, + EuBtsr3SpeedAv:real, + EuBtsr3DispAv:real, + EuBtsr3PeakMin:real, + EuBtsr3PeakMax:real, + EuBtsr4Speed:real, + EuBtsr4SpeedAv:real, + EuBtsr4PeakMin:real, + EuBtsr4PeakMax:real, + EuBtsr4DispAv:real, + EuTemperatureLoggers:dynamic, + EuPumpFlows:dynamic, + EuInkLinesPressure:dynamic, + EuSpareDataArray:dynamic, + EuDispenser1Voltage:real, + EuDispenser2Voltage:real, + EuDispenser3Voltage:real, + EuDispenser4Voltage:real, + EuDispenser5Voltage:real, + EuDispenser6Voltage:real, + EuDispenser7Voltage:real, + EuDispenser8Voltage:real, + EuDispenser9Voltage:real, + EuDispenser10Voltage:real, + EuDispenser11Voltage:real, + EuDispenser12Voltage:real, + EuDispenser13Voltage:real, + EuDispenser14Voltage:real, + EuDispenser15Voltage:real, + EuDispenser16Voltage:real, + EuLubricantPumpVoltage:real, + EuDispenser1Pressure:real, + EuDispenser2Pressure:real, + EuDispenser3Pressure:real, + EuDispenser4Pressure:real, + EuDispenser5Pressure:real, + EuDispenser6Pressure:real, + EuDispenser7Pressure:real, + EuDispenser8Pressure:real, + EuLubricantPressure:real, + EuMidTank1Level:real, + EuMidTank2Level:real, + EuMidTank3Level:real, + EuMidTank4Level:real, + EuMidTank5Level:real, + EuMidTank6Level:real, + EuMidTank7Level:real, + EuMidTank8Level:real, + EuChillerTemperature:real, + EuHeadRightAirFlow:real, + EuHeadLeftAirFlow:real, + EuHeadRightVoltage:real, + EuHeadLeftVoltage:real, + EuDryerAirFlow:real, + EuBlowerVoltage:real, + EuWasteLevel:real, + EuSpare1:real, + EuSpare2:real, + EuSpare3:real, + EuSpare4:real, + EuBtsr5DispAv:real, + EuBtsr6DispAv:real, + EuBtsr7DispAv:real, + EuBtsr8DispAv:real, + EuBtsr5PeakMax:real, + EuBtsr6PeakMax:real, + EuBtsr7PeakMax:real, + EuBtsr8PeakMax:real, + EuBtsr5PeakMin:real, + EuBtsr6PeakMin:real, + EuBtsr7PeakMin:real, + EuBtsr8PeakMin:real, + EuBtsr5Speed:real, + EuBtsr6Speed:real, + EuBtsr7Speed:real, + EuBtsr8Speed:real, + EuBtsr5SpeedAv:real, + EuBtsr6SpeedAv:real, + EuBtsr7SpeedAv:real, + EuBtsr8SpeedAv:real, + EuDispenser17Voltage:real, + EuDispenser18Voltage:real, + EuDispenser19Voltage:real, + EuDispenser20Voltage:real, + EuDispenser21Voltage:real, + EuDispenser22Voltage:real, + EuDispenser9Pressure:real, + EuDispenser10Pressure:real, + EuDispenser11Pressure:real, + EuMidTank9Level:real, + EuMidTank1Level0:real, + EuMidTank1Level1:real, + EuPump1Current:real, + EuPump2Current:real, + EuPump3Current:real, + EuPump4Current:real, + EuPump5Current:real, + EuPump6Current:real, + EuPump7Current:real, + EuPump8Current:real, + EuPump9Current:real, + EuPump10Current:real, + EuPump11Current:real, + EuPump12Current:real, + EuPump13Current:real, + EuPump14Current:real, + EuPump15Current:real, + EuPump16Current:real, + EuPump17Current:real, + EuPump18Current:real, + EuPump19Current:real, + EuPump20Current:real, + EuPump21Current:real, + EuPump22Current:real, + EuWastePumpVoltage:real, + EuDryerOutgoingAirflow:real, + EuDryerIncomingVoltage:real, + EuDryerOutgoingVoltage:real, + EuDryerAirTemperature:real, + EuPump1CardTemperature:real, + EuPump2CardTemperature:real, + EuPump3CardTemperature:real, + EuPump4CardTemperature:real, + EuPump5CardTemperature:real, + EuWasteJerricanWeight:real, + EuWasteFrontPumpCurrent:real, + EuWasteRearPumpCurrent:real +) diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create EventTypes Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create EventTypes Table.kql new file mode 100644 index 000000000..a9c37098d --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create EventTypes Table.kql @@ -0,0 +1,18 @@ +.create table EventTypesTable ( + ID: int, + GUID: string, + LAST_UPDATED: datetime, + CODE: int, + NAME: string, + TITLE: string, + DESCRIPTION: string, + TECHNICAL_DESCRIPTION: string, + COMPONENT_INDEX: int, + EVENT_CATEGORY: int, + EVENT_GROUP: int, + EVENT_NOTIFICATION_TIME: int, + EVENT_ACTIONS: string, + REQUIRES_USER_INTERVENTION: bool, + GUIDANCE: string, + PERSISTENT: bool +) diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Events Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Events Table.kql new file mode 100644 index 000000000..e5fbf14a6 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Events Table.kql @@ -0,0 +1,13 @@ +.create table EventsTable ( + SerialNumber: string, + MachineType: string, + Environment: string, + Organization: string, + Site: string, + CreatedTime: datetime, + UploadTime: datetime, + ID: string, + HostName: string, + EventTypeGuid: string, + Description: string +)
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create JobRuns Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create JobRuns Table.kql new file mode 100644 index 000000000..29d63fa0a --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create JobRuns Table.kql @@ -0,0 +1 @@ +.create table JobRunsTable (ID: string, SerialNumber: string, MachineType: string, Environment: string, Organization: string, Site: string, CreatedTime: datetime, UploadTime: datetime, JobName: string, Kind: string, Thread: string, NumberOfUnits: int, InterSegmentLength: int, LubricationEnabled: bool, SpoolTypeDistribution: int, NumberOfSpools: int, LogicalLength: real, ActualLength: real, TotalLength: real, StartPosition: real, EndPosition: real, Distance: real, StartTime: datetime, EndTime: datetime, Duration: timespan, HeatingDuration: timespan, Status: string, OutputCyan: long, OutputMagenta: long, OutputYellow: long, OutputBlack: long, OutputLightCyan: long, OutputLightMagenta: long, OutputLightYellow: long, OutputBlue: long, OutputLightBlue: long, OutputOrange: long, OutputLightOrange: long, OutputRubine: long, OutputLightRubine: long, OutputNavy: long, OutputViolet: long, OutputTransparent: long, OutputLubricant: long, FailureReason: string, ApplicationVersion: string, FirmwareVersion: string, Segments: dynamic, FineTuning: dynamic, ProcessParameters: dynamic)
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create JobStatus Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create JobStatus Table.kql new file mode 100644 index 000000000..69286e37f --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create JobStatus Table.kql @@ -0,0 +1 @@ +.create-merge table JobStatusTable (Type:string,Version:int,Environment:string,MachineType:string,SerialNumber:string,Organization:string,Site:string,UploadTime:datetime,CreatedTime:datetime,ID:string,JobName:string,Status:string,TotalTime:timespan,RemainingTime:timespan,Progress:real,TotalProgress:real,CurrentUnit:int,RemainingUnits:int,CurrentUnitProgress:real,CurrentUnitTotalProgress:real,Message:string)
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Log Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Log Table.kql new file mode 100644 index 000000000..a737ffef3 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Log Table.kql @@ -0,0 +1,15 @@ +.create table LogsTable ( + SerialNumber: string, + MachineType: string, + Environment: string, + Organization: string, + Site: string, + CreatedTime: datetime, + UploadTime: datetime, + Source: string, + Category: string, + Class: string, + Method: string, + Line: int, + Message: string +) diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create MachineStatuses Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create MachineStatuses Table.kql new file mode 100644 index 000000000..b109eebdd --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create MachineStatuses Table.kql @@ -0,0 +1,12 @@ +.create table MachineStatusesTable ( + SerialNumber: string, + MachineType: string, + Environment: string, + Organization: string, + Site: string, + CreatedTime: datetime, + UploadTime: datetime, + State: string, + OverallTemperature: real, + Status: dynamic +) diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Machines Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Machines Table.kql new file mode 100644 index 000000000..b14ce6e75 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create Machines Table.kql @@ -0,0 +1,42 @@ +.create table MachinesTable ( + ENVIRONMENT: string, + GUID: string, + LAST_UPDATED: datetime, + SERIAL_NUMBER: string, + NAME: string, + PRODUCTION_DATE: datetime, + ORGANIZATION_GUID: string, + SITE_GUID: string, + MACHINE_VERSION_GUID: string, + CONFIGURATION_GUID: string, + DEFAULT_RML_GUID: string, + LOADED_RML_GUID: string, + TARGET_JOB_TYPES: string, + TARGET_COLOR_SPACE_CODES: string, + DEFAULT_COLOR_SPACE_GUID: string, + DEFAULT_SEGMENT_LENGTH: real, + DEFAULT_SPOOL_TYPE_GUID: string, + OS_KEY: string, + AUTO_LOGIN: bool, + AUTO_CHECK_FOR_UPDATES: bool, + SETUP_ACTIVATION: bool, + SETUP_REMOTE_ASSISTANCE: bool, + SETUP_UWF: bool, + SETUP_FIRMWARE: bool, + SETUP_FPGA: bool, + IS_DEMO: bool, + SUSPEND_VERSION_UPDATE: bool, + FORCE_VERSION_UPDATE: bool, + PERFORM_SCHEMA_UPDATE_ON_DATA_UPDATE: bool, + DEVICE_COM_PORT: string, + IS_DEVICE_REGISTERED: bool, + DEVICE_ID: string, + DEVICE_NAME: string, + HEAD_TYPE: int, + ACTIVATION_KEY: string, + LIGHT_INKS_INSTALLED: bool, + BTSR_INSTALLED: bool, + VERSION_TAG: string, + MACHINE_TYPE: int, + ALLOW_SMS_NOTIFICATIONS: bool +)
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create MachinesUpdates Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create MachinesUpdates Table.kql new file mode 100644 index 000000000..dd0be9d67 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create MachinesUpdates Table.kql @@ -0,0 +1,17 @@ +.create table MachinesUpdatesTable ( + SerialNumber: string, + MachineType: string, + Environment: string, + Organization: string, + Site: string, + CreatedTime: datetime, + UploadTime: datetime, + StartTime: datetime, + EndTime: datetime, + ApplicationVersion: string, + FirmwareVersion: string, + VersionTag: string, + FailedReason: string, + FailedLog: string, + Status: string +) diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create TechMonitors Table.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create TechMonitors Table.kql new file mode 100644 index 000000000..02550a143 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create TechMonitors Table.kql @@ -0,0 +1,14 @@ +.create table TechMonitorsTable ( + ID: int, + GUID: string, + LAST_UPDATED: datetime, + CODE: int, + NAME: string, + DESCRIPTION: string, + MIN: real, + MAX: real, + UNITS: string, + POINTS_PER_FRAME: int, + MULTI_CHANNEL: bool, + CHANNEL_COUNT: int +)
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create TelemetryTable.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create TelemetryTable.kql new file mode 100644 index 000000000..d3033108b --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Create TelemetryTable.kql @@ -0,0 +1 @@ +.create table TelemetryTable (Type: string, Environment: string, MachineType: string, SerialNumber: string, UploadTime: datetime, Telemetry: dynamic, Version: int, Organization: string, Site: string, CreatedTime: datetime)
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Diagnostics Policy Update.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Diagnostics Policy Update.kql new file mode 100644 index 000000000..9ee272b22 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Diagnostics Policy Update.kql @@ -0,0 +1 @@ +.alter table DiagnosticsTable policy update @'[{"IsEnabled": true,"Source": "TelemetryTable","Query": "let raw = materialize(TelemetryTable | where Type == \"DiagnosticsFrame\" | extend payload = todynamic(Telemetry) | extend m = payload[\"Monitors\"] | project SerialNumber, MachineType, Environment, Organization, Site, CreatedTime, UploadTime, Dancer1Angle = todouble(m[\"Dancer1Angle\"]), Dancer2Angle = todouble(m[\"Dancer2Angle\"]), Dancer3Angle = todouble(m[\"Dancer3Angle\"]), FeederMotorFrequency = todouble(m[\"FeederMotorFrequency\"]), DryerMotor = todouble(m[\"DryerMotor\"]), PollerMotor = todouble(m[\"PollerMotor\"]), WinderMotor = todouble(m[\"WinderMotor\"]), ScrewMotor = todouble(m[\"ScrewMotor\"]), ThreadSpeed = todouble(m[\"ThreadSpeed\"]), MixerTemperature = todouble(m[\"MixerTemperature\"]), HeadZone1Temperature = todouble(m[\"HeadZone1Temperature\"]), HeadZone2Temperature = todouble(m[\"HeadZone2Temperature\"]), HeadZone3Temperature = todouble(m[\"HeadZone3Temperature\"]), HeadAirFlow = todouble(m[\"HeadAirFlow\"]), FeederTension = todouble(m[\"FeederTension\"]), PullerTension = todouble(m[\"PullerTension\"]), DryerZone1Temperature = todouble(m[\"DryerZone1Temperature\"]), DryerZone2Temperature = todouble(m[\"DryerZone2Temperature\"]), DryerZone3Temperature = todouble(m[\"DryerZone3Temperature\"]), DryerAirFlow = todouble(m[\"DryerAirFlow\"]), WinderTension = todouble(m[\"WinderTension\"]), DispensersMotorsFrequency = todynamic(m[\"DispensersMotorsFrequency\"]), DispensersAngularEncoders = todynamic(m[\"DispensersAngularEncoders\"]), DispensersLinearPositions = todynamic(m[\"DispensersLinearPositions\"]), DispensersPressure = todynamic(m[\"DispensersPressure\"]), FilterDeltaPressure = todouble(m[\"FilterDeltaPressure\"]), ChillerTemperature = todouble(m[\"ChillerTemperature\"]), Dispenser1MotorFrequency = todouble(m[\"Dispenser1MotorFrequency\"]), Dispenser2MotorFrequency = todouble(m[\"Dispenser2MotorFrequency\"]), Dispenser3MotorFrequency = todouble(m[\"Dispenser3MotorFrequency\"]), Dispenser4MotorFrequency = todouble(m[\"Dispenser4MotorFrequency\"]), Dispenser5MotorFrequency = todouble(m[\"Dispenser5MotorFrequency\"]), Dispenser6MotorFrequency = todouble(m[\"Dispenser6MotorFrequency\"]), Dispenser7MotorFrequency = todouble(m[\"Dispenser7MotorFrequency\"]), Dispenser8MotorFrequency = todouble(m[\"Dispenser8MotorFrequency\"]), HeadZone4Temperature = todouble(m[\"HeadZone4Temperature\"]), HeadZone5Temperature = todouble(m[\"HeadZone5Temperature\"]), HeadZone6Temperature = todouble(m[\"HeadZone6Temperature\"]), BlowerVoltage = todouble(m[\"BlowerVoltage\"]), Dispenser1Pressure = todouble(m[\"Dispenser1Pressure\"]), Dispenser2Pressure = todouble(m[\"Dispenser2Pressure\"]), Dispenser3Pressure = todouble(m[\"Dispenser3Pressure\"]), Dispenser4Pressure = todouble(m[\"Dispenser4Pressure\"]), Dispenser5Pressure = todouble(m[\"Dispenser5Pressure\"]), Dispenser6Pressure = todouble(m[\"Dispenser6Pressure\"]), Dispenser7Pressure = todouble(m[\"Dispenser7Pressure\"]), Dispenser8Pressure = todouble(m[\"Dispenser8Pressure\"]), MidTank1Level = todouble(m[\"MidTank1Level\"]), MidTank2Level = todouble(m[\"MidTank2Level\"]), MidTank3Level = todouble(m[\"MidTank3Level\"]), MidTank4Level = todouble(m[\"MidTank4Level\"]), MidTank5Level = todouble(m[\"MidTank5Level\"]), MidTank6Level = todouble(m[\"MidTank6Level\"]), MidTank7Level = todouble(m[\"MidTank7Level\"]), MidTank8Level = todouble(m[\"MidTank8Level\"]), DrierZone1HeaterCurrent = todouble(m[\"DrierZone1HeaterCurrent\"]), DrierZone2HeaterCurrent = todouble(m[\"DrierZone2HeaterCurrent\"]), HeadZone1HeaterCurrent = todouble(m[\"HeadZone1HeaterCurrent\"]), HeadZone2HeaterCurrent = todouble(m[\"HeadZone2HeaterCurrent\"]), HeadZone3HeaterCurrent = todouble(m[\"HeadZone3HeaterCurrent\"]), HeadZone4HeaterCurrent = todouble(m[\"HeadZone4HeaterCurrent\"]), HeadZone56HeaterCurrent = todouble(m[\"HeadZone56HeaterCurrent\"]), Mixer1HeaterCurrent = todouble(m[\"Mixer1HeaterCurrent\"]), DispensersInkLevel = todynamic(m[\"DispensersInkLevel\"]), MidTanksInkLevel = todynamic(m[\"MidTanksInkLevel\"]), OverallTemperature = todouble(m[\"OverallTemperature\"]), HeadZone7HeaterCurrent = todouble(m[\"HeadZone7HeaterCurrent\"]), HeadZone7Temperature = todouble(m[\"HeadZone7Temperature\"]), HeadZone8HeaterCurrent = todouble(m[\"HeadZone8HeaterCurrent\"]), HeadZone8Temperature = todouble(m[\"HeadZone8Temperature\"]), HeadZone9HeaterCurrent = todouble(m[\"HeadZone9HeaterCurrent\"]), HeadZone9Temperature = todouble(m[\"HeadZone9Temperature\"]), HeadZone10HeaterCurrent = todouble(m[\"HeadZone10HeaterCurrent\"]), HeadZone10Temperature = todouble(m[\"HeadZone10Temperature\"]), HeadZone11HeaterCurrent = todouble(m[\"HeadZone11HeaterCurrent\"]), HeadZone11Temperature = todouble(m[\"HeadZone11Temperature\"]), HeadZone12HeaterCurrent = todouble(m[\"HeadZone12HeaterCurrent\"]), HeadZone12Temperature = todouble(m[\"HeadZone12Temperature\"]), HeadBlowerVoltage1 = todouble(m[\"HeadBlowerVoltage1\"]), HeadBlowerVoltage2 = todouble(m[\"HeadBlowerVoltage2\"]), HeadCoverHeater1Current = todouble(m[\"HeadCoverHeater1Current\"]), HeadCoverHeater1Temperature = todouble(m[\"HeadCoverHeater1Temperature\"]), HeadCoverHeater2Current = todouble(m[\"HeadCoverHeater2Current\"]), HeadCoverHeater2Temperature = todouble(m[\"HeadCoverHeater2Temperature\"]), WHSBlower2Voltage = todouble(m[\"WHSBlower2Voltage\"]), GasSensor = todouble(m[\"GasSensor\"]), IncomingVoltage = todouble(m[\"IncomingVoltage\"]), WasteLevel = todouble(m[\"WasteLevel\"]), HeadBlower1AirFlow = todouble(m[\"HeadBlower1AirFlow\"]), HeadBlower2AirFlow = todouble(m[\"HeadBlower2AirFlow\"]), ShinkoSetValue = todouble(m[\"ShinkoSetValue\"]), ShinkoCurrentValue = todouble(m[\"ShinkoCurrentValue\"]), TotalWHSFlow = todouble(m[\"TotalWHSFlow\"]), EuWinder1Dancer = todouble(m[\"EuWinder1Dancer\"]), EuWinder2Dancer = todouble(m[\"EuWinder2Dancer\"]), EuWinder3Dancer = todouble(m[\"EuWinder3Dancer\"]), EuWinder4Dancer = todouble(m[\"EuWinder4Dancer\"]), EuWinder1Motor = todouble(m[\"EuWinder1Motor\"]), EuWinder2Motor = todouble(m[\"EuWinder2Motor\"]), EuWinder3Motor = todouble(m[\"EuWinder3Motor\"]), EuWinder4Motor = todouble(m[\"EuWinder4Motor\"]), EuDryerMotorVelocity = todouble(m[\"EuDryerMotorVelocity\"]), EuDryerMotorTargetVelocity = todouble(m[\"EuDryerMotorTargetVelocity\"]), EuDryerMotorCurrent = todouble(m[\"EuDryerMotorCurrent\"]), EuPullerDancer = todouble(m[\"EuPullerDancer\"]), EuPullerMotor = todouble(m[\"EuPullerMotor\"]), EuDryerZone1Temperature = todouble(m[\"EuDryerZone1Temperature\"]), EuDryerZone2Temperature = todouble(m[\"EuDryerZone2Temperature\"]), EuDryerZone3Temperature = todouble(m[\"EuDryerZone3Temperature\"]), EuHeadZone1Temperature = todouble(m[\"EuHeadZone1Temperature\"]), EuHeadZone2Temperature = todouble(m[\"EuHeadZone2Temperature\"]), EuHeadZone3Temperature = todouble(m[\"EuHeadZone3Temperature\"]), EuMixerTemperature = todouble(m[\"EuMixerTemperature\"]), EuTunnelTemperature = todouble(m[\"EuTunnelTemperature\"]), EuLubricantTemperature = todouble(m[\"EuLubricantTemperature\"]), EuAmbientTemperature = todouble(m[\"EuAmbientTemperature\"]), EuElectricalCabinetTemperature = todouble(m[\"EuElectricalCabinetTemperature\"]), EuDryerZone1Current = todouble(m[\"EuDryerZone1Current\"]), EuDryerZone2Current = todouble(m[\"EuDryerZone2Current\"]), EuDryerZone3Current = todouble(m[\"EuDryerZone3Current\"]), EuHeadZone1Current = todouble(m[\"EuHeadZone1Current\"]), EuHeadZone2Current = todouble(m[\"EuHeadZone2Current\"]), EuHeadZone3Current = todouble(m[\"EuHeadZone3Current\"]), EuMixerCurrent = todouble(m[\"EuMixerCurrent\"]), EuTunnelCurrent = todouble(m[\"EuTunnelCurrent\"]), EuLubricantCurrent = todouble(m[\"EuLubricantCurrent\"]), EuBtsr1Speed = todouble(m[\"EuBtsr1Speed\"]), EuBtsr1SpeedAv = todouble(m[\"EuBtsr1SpeedAv\"]), EuBtsr1DispAv = todouble(m[\"EuBtsr1DispAv\"]), EuBtsr1PeakMin = todouble(m[\"EuBtsr1PeakMin\"]), EuBtsr1PeakMax = todouble(m[\"EuBtsr1PeakMax\"]), EuBtsr2Speed = todouble(m[\"EuBtsr2Speed\"]), EuBtsr2SpeedAv = todouble(m[\"EuBtsr2SpeedAv\"]), EuBtsr2DispAv = todouble(m[\"EuBtsr2DispAv\"]), EuBtsr2PeakMin = todouble(m[\"EuBtsr2PeakMin\"]), EuBtsr2PeakMax = todouble(m[\"EuBtsr2PeakMax\"]), EuBtsr3Speed = todouble(m[\"EuBtsr3Speed\"]), EuBtsr3SpeedAv = todouble(m[\"EuBtsr3SpeedAv\"]), EuBtsr3DispAv = todouble(m[\"EuBtsr3DispAv\"]), EuBtsr3PeakMin = todouble(m[\"EuBtsr3PeakMin\"]), EuBtsr3PeakMax = todouble(m[\"EuBtsr3PeakMax\"]), EuBtsr4Speed = todouble(m[\"EuBtsr4Speed\"]), EuBtsr4SpeedAv = todouble(m[\"EuBtsr4SpeedAv\"]), EuBtsr4PeakMin = todouble(m[\"EuBtsr4PeakMin\"]), EuBtsr4PeakMax = todouble(m[\"EuBtsr4PeakMax\"]), EuBtsr4DispAv = todouble(m[\"EuBtsr4DispAv\"]), EuTemperatureLoggers = todynamic(m[\"EuTemperatureLoggers\"]), EuPumpFlows = todynamic(m[\"EuPumpFlows\"]), EuInkLinesPressure = todynamic(m[\"EuInkLinesPressure\"]), EuSpareDataArray = todynamic(m[\"EuSpareDataArray\"]), EuDispenser1Voltage = todouble(m[\"EuDispenser1Voltage\"]), EuDispenser2Voltage = todouble(m[\"EuDispenser2Voltage\"]), EuDispenser3Voltage = todouble(m[\"EuDispenser3Voltage\"]), EuDispenser4Voltage = todouble(m[\"EuDispenser4Voltage\"]), EuDispenser5Voltage = todouble(m[\"EuDispenser5Voltage\"]), EuDispenser6Voltage = todouble(m[\"EuDispenser6Voltage\"]), EuDispenser7Voltage = todouble(m[\"EuDispenser7Voltage\"]), EuDispenser8Voltage = todouble(m[\"EuDispenser8Voltage\"]), EuDispenser9Voltage = todouble(m[\"EuDispenser9Voltage\"]), EuDispenser10Voltage = todouble(m[\"EuDispenser10Voltage\"]), EuDispenser11Voltage = todouble(m[\"EuDispenser11Voltage\"]), EuDispenser12Voltage = todouble(m[\"EuDispenser12Voltage\"]), EuDispenser13Voltage = todouble(m[\"EuDispenser13Voltage\"]), EuDispenser14Voltage = todouble(m[\"EuDispenser14Voltage\"]), EuDispenser15Voltage = todouble(m[\"EuDispenser15Voltage\"]), EuDispenser16Voltage = todouble(m[\"EuDispenser16Voltage\"]), EuLubricantPumpVoltage = todouble(m[\"EuLubricantPumpVoltage\"]), EuDispenser1Pressure = todouble(m[\"EuDispenser1Pressure\"]), EuDispenser2Pressure = todouble(m[\"EuDispenser2Pressure\"]), EuDispenser3Pressure = todouble(m[\"EuDispenser3Pressure\"]), EuDispenser4Pressure = todouble(m[\"EuDispenser4Pressure\"]), EuDispenser5Pressure = todouble(m[\"EuDispenser5Pressure\"]), EuDispenser6Pressure = todouble(m[\"EuDispenser6Pressure\"]), EuDispenser7Pressure = todouble(m[\"EuDispenser7Pressure\"]), EuDispenser8Pressure = todouble(m[\"EuDispenser8Pressure\"]), EuLubricantPressure = todouble(m[\"EuLubricantPressure\"]), EuMidTank1Level = todouble(m[\"EuMidTank1Level\"]), EuMidTank2Level = todouble(m[\"EuMidTank2Level\"]), EuMidTank3Level = todouble(m[\"EuMidTank3Level\"]), EuMidTank4Level = todouble(m[\"EuMidTank4Level\"]), EuMidTank5Level = todouble(m[\"EuMidTank5Level\"]), EuMidTank6Level = todouble(m[\"EuMidTank6Level\"]), EuMidTank7Level = todouble(m[\"EuMidTank7Level\"]), EuMidTank8Level = todouble(m[\"EuMidTank8Level\"]), EuChillerTemperature = todouble(m[\"EuChillerTemperature\"]), EuHeadRightAirFlow = todouble(m[\"EuHeadRightAirFlow\"]), EuHeadLeftAirFlow = todouble(m[\"EuHeadLeftAirFlow\"]), EuHeadRightVoltage = todouble(m[\"EuHeadRightVoltage\"]), EuHeadLeftVoltage = todouble(m[\"EuHeadLeftVoltage\"]), EuDryerAirFlow = todouble(m[\"EuDryerAirFlow\"]), EuBlowerVoltage = todouble(m[\"EuBlowerVoltage\"]), EuWasteLevel = todouble(m[\"EuWasteLevel\"]), EuSpare1 = todouble(m[\"EuSpare1\"]), EuSpare2 = todouble(m[\"EuSpare2\"]), EuSpare3 = todouble(m[\"EuSpare3\"]), EuSpare4 = todouble(m[\"EuSpare4\"]), EuBtsr5DispAv = todouble(m[\"EuBtsr5DispAv\"]), EuBtsr6DispAv = todouble(m[\"EuBtsr6DispAv\"]), EuBtsr7DispAv = todouble(m[\"EuBtsr7DispAv\"]), EuBtsr8DispAv = todouble(m[\"EuBtsr8DispAv\"]), EuBtsr5PeakMax = todouble(m[\"EuBtsr5PeakMax\"]), EuBtsr6PeakMax = todouble(m[\"EuBtsr6PeakMax\"]), EuBtsr7PeakMax = todouble(m[\"EuBtsr7PeakMax\"]), EuBtsr8PeakMax = todouble(m[\"EuBtsr8PeakMax\"]), EuBtsr5PeakMin = todouble(m[\"EuBtsr5PeakMin\"]), EuBtsr6PeakMin = todouble(m[\"EuBtsr6PeakMin\"]), EuBtsr7PeakMin = todouble(m[\"EuBtsr7PeakMin\"]), EuBtsr8PeakMin = todouble(m[\"EuBtsr8PeakMin\"]), EuBtsr5Speed = todouble(m[\"EuBtsr5Speed\"]), EuBtsr6Speed = todouble(m[\"EuBtsr6Speed\"]), EuBtsr7Speed = todouble(m[\"EuBtsr7Speed\"]), EuBtsr8Speed = todouble(m[\"EuBtsr8Speed\"]), EuBtsr5SpeedAv = todouble(m[\"EuBtsr5SpeedAv\"]), EuBtsr6SpeedAv = todouble(m[\"EuBtsr6SpeedAv\"]), EuBtsr7SpeedAv = todouble(m[\"EuBtsr7SpeedAv\"]), EuBtsr8SpeedAv = todouble(m[\"EuBtsr8SpeedAv\"]), EuDispenser17Voltage = todouble(m[\"EuDispenser17Voltage\"]), EuDispenser18Voltage = todouble(m[\"EuDispenser18Voltage\"]), EuDispenser19Voltage = todouble(m[\"EuDispenser19Voltage\"]), EuDispenser20Voltage = todouble(m[\"EuDispenser20Voltage\"]), EuDispenser21Voltage = todouble(m[\"EuDispenser21Voltage\"]), EuDispenser22Voltage = todouble(m[\"EuDispenser22Voltage\"]), EuDispenser9Pressure = todouble(m[\"EuDispenser9Pressure\"]), EuDispenser10Pressure = todouble(m[\"EuDispenser10Pressure\"]), EuDispenser11Pressure = todouble(m[\"EuDispenser11Pressure\"]), EuMidTank9Level = todouble(m[\"EuMidTank9Level\"]), EuMidTank1Level0 = todouble(m[\"EuMidTank1Level0\"]), EuMidTank1Level1 = todouble(m[\"EuMidTank1Level1\"]), EuPump1Current = todouble(m[\"EuPump1Current\"]), EuPump2Current = todouble(m[\"EuPump2Current\"]), EuPump3Current = todouble(m[\"EuPump3Current\"]), EuPump4Current = todouble(m[\"EuPump4Current\"]), EuPump5Current = todouble(m[\"EuPump5Current\"]), EuPump6Current = todouble(m[\"EuPump6Current\"]), EuPump7Current = todouble(m[\"EuPump7Current\"]), EuPump8Current = todouble(m[\"EuPump8Current\"]), EuPump9Current = todouble(m[\"EuPump9Current\"]), EuPump10Current = todouble(m[\"EuPump10Current\"]), EuPump11Current = todouble(m[\"EuPump11Current\"]), EuPump12Current = todouble(m[\"EuPump12Current\"]), EuPump13Current = todouble(m[\"EuPump13Current\"]), EuPump14Current = todouble(m[\"EuPump14Current\"]), EuPump15Current = todouble(m[\"EuPump15Current\"]), EuPump16Current = todouble(m[\"EuPump16Current\"]), EuPump17Current = todouble(m[\"EuPump17Current\"]), EuPump18Current = todouble(m[\"EuPump18Current\"]), EuPump19Current = todouble(m[\"EuPump19Current\"]), EuPump20Current = todouble(m[\"EuPump20Current\"]), EuPump21Current = todouble(m[\"EuPump21Current\"]), EuPump22Current = todouble(m[\"EuPump22Current\"]), EuWastePumpVoltage = todouble(m[\"EuWastePumpVoltage\"]), EuDryerOutgoingAirflow = todouble(m[\"EuDryerOutgoingAirflow\"]), EuDryerIncomingVoltage = todouble(m[\"EuDryerIncomingVoltage\"]), EuDryerOutgoingVoltage = todouble(m[\"EuDryerOutgoingVoltage\"]), EuDryerAirTemperature = todouble(m[\"EuDryerAirTemperature\"]), EuPump1CardTemperature = todouble(m[\"EuPump1CardTemperature\"]), EuPump2CardTemperature = todouble(m[\"EuPump2CardTemperature\"]), EuPump3CardTemperature = todouble(m[\"EuPump3CardTemperature\"]), EuPump4CardTemperature = todouble(m[\"EuPump4CardTemperature\"]), EuPump5CardTemperature = todouble(m[\"EuPump5CardTemperature\"]), EuWasteJerricanWeight = todouble(m[\"EuWasteJerricanWeight\"]), EuWasteFrontPumpCurrent = todouble(m[\"EuWasteFrontPumpCurrent\"]), EuWasteRearPumpCurrent = todouble(m[\"EuWasteRearPumpCurrent\"])); raw","IsTransactional": false,"PropagateIngestionProperties": true}]' diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Event Table Policy Update.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Event Table Policy Update.kql new file mode 100644 index 000000000..b416563ed --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Event Table Policy Update.kql @@ -0,0 +1 @@ +.alter table EventsTable policy update @'[{"IsEnabled": true,"Source": "TelemetryTable","Query": "let raw = materialize(TelemetryTable | where Type == \"Event\" | extend payload = Telemetry | project SerialNumber, MachineType, Environment, Organization, Site, CreatedTime, UploadTime, ID = tostring(payload.ID), HostName = tostring(payload.HostName), EventTypeGuid = tostring(payload.EventTypeGuid), Description = tostring(payload.Description)); raw","IsTransactional": false,"PropagateIngestionProperties": true}]' diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/EventTypes Table Ingestion Mapping.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/EventTypes Table Ingestion Mapping.kql new file mode 100644 index 000000000..6370a5861 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/EventTypes Table Ingestion Mapping.kql @@ -0,0 +1,18 @@ +.create table EventTypesTable ingestion csv mapping "EventTypesMapping" ```[ +{"column":"ID","ordinal":0,"datatype":"int"}, +{"column":"GUID","ordinal":1,"datatype":"string"}, +{"column":"LAST_UPDATED","ordinal":2,"datatype":"datetime"}, +{"column":"CODE","ordinal":3,"datatype":"int"}, +{"column":"NAME","ordinal":4,"datatype":"string"}, +{"column":"TITLE","ordinal":5,"datatype":"string"}, +{"column":"DESCRIPTION","ordinal":6,"datatype":"string"}, +{"column":"TECHNICAL_DESCRIPTION","ordinal":7,"datatype":"string"}, +{"column":"COMPONENT_INDEX","ordinal":8,"datatype":"int"}, +{"column":"EVENT_CATEGORY","ordinal":9,"datatype":"int"}, +{"column":"EVENT_GROUP","ordinal":10,"datatype":"int"}, +{"column":"EVENT_NOTIFICATION_TIME","ordinal":11,"datatype":"int"}, +{"column":"EVENT_ACTIONS","ordinal":12,"datatype":"string"}, +{"column":"REQUIRES_USER_INTERVENTION","ordinal":13,"datatype":"bool"}, +{"column":"GUIDANCE","ordinal":14,"datatype":"string"}, +{"column":"PERSISTENT","ordinal":15,"datatype":"bool"} +]``` diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/JobRunsTable Policy Update.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/JobRunsTable Policy Update.kql new file mode 100644 index 000000000..bc061d9d3 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/JobRunsTable Policy Update.kql @@ -0,0 +1 @@ +.alter table JobRunsTable policy update @'[{"IsEnabled": true,"Source": "TelemetryTable","Query": "let raw = materialize(TelemetryTable | where Type == \"JobRun\" | extend payload = Telemetry | project ID = tostring(payload.ID), SerialNumber, MachineType, Environment, Organization, Site, CreatedTime, UploadTime, JobName = tostring(payload.JobName), Kind = tostring(payload.Kind), Thread = tostring(payload.Thread), NumberOfUnits = toint(payload.NumberOfUnits), InterSegmentLength = toint(payload.InterSegmentLength), LubricationEnabled = tobool(payload.LubricationEnabled), SpoolTypeDistribution = toint(payload.SpoolTypeDistribution), NumberOfSpools = toint(payload.NumberOfSpools), LogicalLength = todouble(payload.LogicalLength), ActualLength = todouble(payload.ActualLength), TotalLength = todouble(payload.TotalLength), StartPosition = todouble(payload.StartPosition), EndPosition = todouble(payload.EndPosition), Distance = todouble(payload.Distance), StartTime = todatetime(payload.StartTime), EndTime = todatetime(payload.EndTime), Duration = totimespan(payload.Duration), HeatingDuration = totimespan(payload.HeatingDuration), Status = tostring(payload.Status), OutputCyan = tolong(payload.OutputCyan), OutputMagenta = tolong(payload.OutputMagenta), OutputYellow = tolong(payload.OutputYellow), OutputBlack = tolong(payload.OutputBlack), OutputLightCyan = tolong(payload.OutputLightCyan), OutputLightMagenta = tolong(payload.OutputLightMagenta), OutputLightYellow = tolong(payload.OutputLightYellow), OutputBlue = tolong(payload.OutputBlue), OutputLightBlue = tolong(payload.OutputLightBlue), OutputOrange = tolong(payload.OutputOrange), OutputLightOrange = tolong(payload.OutputLightOrange), OutputRubine = tolong(payload.OutputRubine), OutputLightRubine = tolong(payload.OutputLightRubine), OutputNavy = tolong(payload.OutputNavy), OutputViolet = tolong(payload.OutputViolet), OutputTransparent = tolong(payload.OutputTransparent), OutputLubricant = tolong(payload.OutputLubricant), FailureReason = tostring(payload.FailureReason), ApplicationVersion = tostring(payload.ApplicationVersion), FirmwareVersion = tostring(payload.FirmwareVersion), Segments = payload.Segments, FineTuning = payload.FineTuning, ProcessParameters = payload.ProcessParameters); raw","IsTransactional": false,"PropagateIngestionProperties": true}]'
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/JobStatus Table Ingestion.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/JobStatus Table Ingestion.kql new file mode 100644 index 000000000..dd7a7a424 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/JobStatus Table Ingestion.kql @@ -0,0 +1 @@ +.create-or-alter table JobStatusTable ingestion json mapping 'JobStatusJsonMapping' '[{"column":"Type","path":"$.Type"},{"column":"Version","path":"$.Version"},{"column":"Environment","path":"$.Environment"},{"column":"MachineType","path":"$.MachineType"},{"column":"SerialNumber","path":"$.SerialNumber"},{"column":"Organization","path":"$.Organization"},{"column":"Site","path":"$.Site"},{"column":"UploadTime","path":"$.UploadTime"},{"column":"CreatedTime","path":"$.CreatedTime"},{"column":"ID","path":"$.Telemetry.ID"},{"column":"JobName","path":"$.Telemetry.JobName"},{"column":"Status","path":"$.Telemetry.Status"},{"column":"TotalTime","path":"$.Telemetry.TotalTime"},{"column":"RemainingTime","path":"$.Telemetry.RemainingTime"},{"column":"Progress","path":"$.Telemetry.Progress"},{"column":"TotalProgress","path":"$.Telemetry.TotalProgress"},{"column":"CurrentUnit","path":"$.Telemetry.CurrentUnit"},{"column":"RemainingUnits","path":"$.Telemetry.RemainingUnits"},{"column":"CurrentUnitProgress","path":"$.Telemetry.CurrentUnitProgress"},{"column":"CurrentUnitTotalProgress","path":"$.Telemetry.CurrentUnitTotalProgress"},{"column":"Message","path":"$.Telemetry.Message"}]'
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Logs Table Update Policy.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Logs Table Update Policy.kql new file mode 100644 index 000000000..bec79d4a1 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Logs Table Update Policy.kql @@ -0,0 +1 @@ +.alter table LogsTable policy update @'[{"IsEnabled": true,"Source": "TelemetryTable","Query": "let raw = materialize(TelemetryTable | where Type == \"Log\" | extend payload = Telemetry | project SerialNumber, MachineType, Environment, Organization, Site, CreatedTime, UploadTime, Source = tostring(payload.Source), Category = tostring(payload.Category), Class = tostring(payload.Class), Method = tostring(payload.Method), Line = toint(payload.Line), Message = tostring(payload.Message)); raw","IsTransactional": false,"PropagateIngestionProperties": true}]' diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachineStatuses Table Update Policy.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachineStatuses Table Update Policy.kql new file mode 100644 index 000000000..6b737d08c --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachineStatuses Table Update Policy.kql @@ -0,0 +1 @@ +.alter table MachineStatusesTable policy update @'[{"IsEnabled": true,"Source": "TelemetryTable","Query": "let raw = materialize(TelemetryTable | where Type == \"MachineStatus\" | extend payload = todynamic(Telemetry) | extend s = payload[\"Status\"] | project SerialNumber, MachineType, Environment, Organization, Site, CreatedTime, UploadTime, State = tostring(s[\"State\"]), OverallTemperature = todouble(s[\"OverallTemperature\"]), Status = s); raw","IsTransactional": false,"PropagateIngestionProperties": true}]' diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachinesTable Ingestion Mapping.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachinesTable Ingestion Mapping.kql new file mode 100644 index 000000000..0cb420b4f --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachinesTable Ingestion Mapping.kql @@ -0,0 +1,43 @@ +.create table MachinesTable ingestion csv mapping 'MachinesMapping' +```[ + {"column":"GUID", "datatype":"string", "ordinal":0}, + {"column":"LAST_UPDATED", "datatype":"datetime", "ordinal":1}, + {"column":"SERIAL_NUMBER", "datatype":"string", "ordinal":2}, + {"column":"NAME", "datatype":"string", "ordinal":3}, + {"column":"PRODUCTION_DATE", "datatype":"datetime", "ordinal":4}, + {"column":"ORGANIZATION_GUID", "datatype":"string", "ordinal":5}, + {"column":"SITE_GUID", "datatype":"string", "ordinal":6}, + {"column":"MACHINE_VERSION_GUID", "datatype":"string", "ordinal":7}, + {"column":"CONFIGURATION_GUID", "datatype":"string", "ordinal":8}, + {"column":"DEFAULT_RML_GUID", "datatype":"string", "ordinal":9}, + {"column":"LOADED_RML_GUID", "datatype":"string", "ordinal":10}, + {"column":"TARGET_JOB_TYPES", "datatype":"string", "ordinal":11}, + {"column":"TARGET_COLOR_SPACE_CODES", "datatype":"string", "ordinal":12}, + {"column":"DEFAULT_COLOR_SPACE_GUID", "datatype":"string", "ordinal":13}, + {"column":"DEFAULT_SEGMENT_LENGTH", "datatype":"real", "ordinal":14}, + {"column":"DEFAULT_SPOOL_TYPE_GUID", "datatype":"string", "ordinal":15}, + {"column":"OS_KEY", "datatype":"string", "ordinal":16}, + {"column":"AUTO_LOGIN", "datatype":"bool", "ordinal":17}, + {"column":"AUTO_CHECK_FOR_UPDATES", "datatype":"bool", "ordinal":18}, + {"column":"SETUP_ACTIVATION", "datatype":"bool", "ordinal":19}, + {"column":"SETUP_REMOTE_ASSISTANCE", "datatype":"bool", "ordinal":20}, + {"column":"SETUP_UWF", "datatype":"bool", "ordinal":21}, + {"column":"SETUP_FIRMWARE", "datatype":"bool", "ordinal":22}, + {"column":"SETUP_FPGA", "datatype":"bool", "ordinal":23}, + {"column":"IS_DEMO", "datatype":"bool", "ordinal":24}, + {"column":"SUSPEND_VERSION_UPDATE", "datatype":"bool", "ordinal":25}, + {"column":"FORCE_VERSION_UPDATE", "datatype":"bool", "ordinal":26}, + {"column":"PERFORM_SCHEMA_UPDATE_ON_DATA_UPDATE", "datatype":"bool", "ordinal":27}, + {"column":"DEVICE_COM_PORT", "datatype":"string", "ordinal":28}, + {"column":"IS_DEVICE_REGISTERED", "datatype":"bool", "ordinal":29}, + {"column":"DEVICE_ID", "datatype":"string", "ordinal":30}, + {"column":"DEVICE_NAME", "datatype":"string", "ordinal":31}, + {"column":"HEAD_TYPE", "datatype":"int", "ordinal":32}, + {"column":"ACTIVATION_KEY", "datatype":"string", "ordinal":33}, + {"column":"LIGHT_INKS_INSTALLED", "datatype":"bool", "ordinal":34}, + {"column":"BTSR_INSTALLED", "datatype":"bool", "ordinal":35}, + {"column":"VERSION_TAG", "datatype":"string", "ordinal":36}, + {"column":"MACHINE_TYPE", "datatype":"int", "ordinal":37}, + {"column":"ALLOW_SMS_NOTIFICATIONS", "datatype":"bool", "ordinal":38}, + {"column":"ENVIRONMENT", "datatype":"string", "ordinal":39} +]``` diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachinesUpdatesTable Policy Update.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachinesUpdatesTable Policy Update.kql new file mode 100644 index 000000000..9b6114a69 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/MachinesUpdatesTable Policy Update.kql @@ -0,0 +1 @@ +.alter table MachinesUpdatesTable policy update @'[{"IsEnabled": true,"Source": "TelemetryTable","Query": "let raw = materialize(TelemetryTable | where Type == \"MachineUpdate\" | extend payload = Telemetry | project SerialNumber, MachineType, Environment, Organization, Site, CreatedTime, UploadTime, StartTime = todatetime(payload.StartTime), EndTime = todatetime(payload.EndTime), ApplicationVersion = tostring(payload.ApplicationVersion), FirmwareVersion = tostring(payload.FirmwareVersion), VersionTag = tostring(payload.VersionTag), FailedReason = tostring(payload.FailedReason), FailedLog = tostring(payload.FailedLog), Status = tostring(payload.Status)); raw","IsTransactional": false,"PropagateIngestionProperties": true}]'
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Set TelemetryTable Auto IngestionTime.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Set TelemetryTable Auto IngestionTime.kql new file mode 100644 index 000000000..ddf0cdf1b --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/Set TelemetryTable Auto IngestionTime.kql @@ -0,0 +1 @@ +.alter table TelemetryTable policy ingestiontime true
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TechMonitors Ingestion Mapping.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TechMonitors Ingestion Mapping.kql new file mode 100644 index 000000000..c835d64fd --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TechMonitors Ingestion Mapping.kql @@ -0,0 +1,14 @@ +.create table TechMonitorsTable ingestion csv mapping "TechMonitorsMapping" ```[ +{"column":"ID","ordinal":0,"datatype":"int"}, +{"column":"GUID","ordinal":1,"datatype":"string"}, +{"column":"LAST_UPDATED","ordinal":2,"datatype":"datetime"}, +{"column":"CODE","ordinal":3,"datatype":"int"}, +{"column":"NAME","ordinal":4,"datatype":"string"}, +{"column":"DESCRIPTION","ordinal":5,"datatype":"string"}, +{"column":"MIN","ordinal":6,"datatype":"real"}, +{"column":"MAX","ordinal":7,"datatype":"real"}, +{"column":"UNITS","ordinal":8,"datatype":"string"}, +{"column":"POINTS_PER_FRAME","ordinal":9,"datatype":"int"}, +{"column":"MULTI_CHANNEL","ordinal":10,"datatype":"bool"}, +{"column":"CHANNEL_COUNT","ordinal":11,"datatype":"int"} +]``` diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TelemetryTable Enable Streaming.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TelemetryTable Enable Streaming.kql new file mode 100644 index 000000000..dad0b9d81 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TelemetryTable Enable Streaming.kql @@ -0,0 +1 @@ +.alter table TelemetryTable policy streamingingestion enable
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TelemetryTable Ingestion Mapping.kql b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TelemetryTable Ingestion Mapping.kql new file mode 100644 index 000000000..cb4f2f026 --- /dev/null +++ b/Software/Visual_Studio/Tango.Telemetry/Kusto Scripts/TelemetryTable Ingestion Mapping.kql @@ -0,0 +1,12 @@ +.alter table TelemetryTable ingestion json mapping 'telemetryMapping' ```[ + { "column":"Type", "path":"$.Type" }, + { "column":"Version", "path":"$.Version" }, + { "column":"Environment", "path":"$.Environment" }, + { "column":"MachineType", "path":"$.MachineType" }, + { "column":"SerialNumber", "path":"$.SerialNumber" }, + { "column":"Organization", "path":"$.Organization" }, + { "column":"Site", "path":"$.Site" }, + { "column":"UploadTime", "path":"$.UploadTime" }, + { "column":"CreatedTime", "path":"$.CreatedTime" }, + { "column":"Telemetry", "path":"$.Telemetry" } +]```
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Telemetry/Tango.Telemetry.csproj b/Software/Visual_Studio/Tango.Telemetry/Tango.Telemetry.csproj index 8b0c4dcc8..611734724 100644 --- a/Software/Visual_Studio/Tango.Telemetry/Tango.Telemetry.csproj +++ b/Software/Visual_Studio/Tango.Telemetry/Tango.Telemetry.csproj @@ -296,6 +296,30 @@ <Compile Include="TelemetryPendingStorageSource.cs" /> <Compile Include="TelemetryInMemoryQueueManager.cs" /> <Compile Include="TelemetryStreamingAvailableEventArgs.cs" /> + <None Include="Kusto Scripts\Create Diagnostics Table.kql" /> + <None Include="Kusto Scripts\Create Events Table.kql" /> + <None Include="Kusto Scripts\Create EventTypes Table.kql" /> + <None Include="Kusto Scripts\Create JobRuns Table.kql" /> + <None Include="Kusto Scripts\Create JobStatus Table.kql" /> + <None Include="Kusto Scripts\Create Log Table.kql" /> + <None Include="Kusto Scripts\Create Machines Table.kql" /> + <None Include="Kusto Scripts\Create MachineStatuses Table.kql" /> + <None Include="Kusto Scripts\Create MachinesUpdates Table.kql" /> + <None Include="Kusto Scripts\Create TechMonitors Table.kql" /> + <None Include="Kusto Scripts\Create TelemetryTable.kql" /> + <None Include="Kusto Scripts\Diagnostics Policy Update.kql" /> + <None Include="Kusto Scripts\Event Table Policy Update.kql" /> + <None Include="Kusto Scripts\EventTypes Table Ingestion Mapping.kql" /> + <None Include="Kusto Scripts\JobRunsTable Policy Update.kql" /> + <None Include="Kusto Scripts\JobStatus Table Ingestion.kql" /> + <None Include="Kusto Scripts\Logs Table Update Policy.kql" /> + <None Include="Kusto Scripts\MachinesTable Ingestion Mapping.kql" /> + <None Include="Kusto Scripts\MachineStatuses Table Update Policy.kql" /> + <None Include="Kusto Scripts\MachinesUpdatesTable Policy Update.kql" /> + <None Include="Kusto Scripts\Set TelemetryTable Auto IngestionTime.kql" /> + <None Include="Kusto Scripts\TechMonitors Ingestion Mapping.kql" /> + <None Include="Kusto Scripts\TelemetryTable Enable Streaming.kql" /> + <None Include="Kusto Scripts\TelemetryTable Ingestion Mapping.kql" /> <None Include="TelemetryPublisherAdvanced.cs" /> <Compile Include="TelemetryPublisherEventArgs.cs" /> <Compile Include="TelemetryPackagePublishingEventArgs.cs" /> |
