Repository navigation
Expand file tree
/
Copy pathschema.json
More file actions
1 lines (1 loc) · 18.6 KB
/
Copy pathschema.json
File metadata and controls
1 lines (1 loc) · 18.6 KB
1
{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Config","$defs":{"ACARSConnectionConfig":{"properties":{"Module":true,"Host":{"type":"string","description":"IP or DNS to your ACARSHub instance serving JSON data from a particular port.","default":"acarshub"},"Port":{"type":"integer","description":"ACARS JSON port.","default":15550},"SelectedFields":{"items":{"type":"string"},"type":"array","description":"Only provide these fields to configured steps.","examples":[["ACARSMessage.ASSStatus","ACARSMessage.Acknowledge","ACARSMessage.AircraftTailCode","ACARSMessage.App.ACARSRouterUUID","ACARSMessage.App.ACARSRouterVersion","ACARSMessage.App.Name","ACARSMessage.App.Proxied","ACARSMessage.App.ProxiedBy","ACARSMessage.App.Version","ACARSMessage.BlockID","ACARSMessage.Channel","ACARSMessage.ErrorCode","ACARSMessage.FlightNumber","ACARSMessage.FrequencyMHz","ACARSMessage.Label","ACARSMessage.MessageNumber","ACARSMessage.MessageText","ACARSMessage.Mode","ACARSMessage.Model.DeletedAt.Valid","ACARSMessage.Model.ID","ACARSMessage.Processed","ACARSMessage.SignaldBm","ACARSMessage.StationID","ACARSMessage.Timestamp","ACARSProcessor.ACARSDramaTailNumberLink","ACARSProcessor.FlightNumber","ACARSProcessor.FrequencyHz","ACARSProcessor.FrequencyMHz","ACARSProcessor.From","ACARSProcessor.ImageLink","ACARSProcessor.Label","ACARSProcessor.MessageText","ACARSProcessor.Mode","ACARSProcessor.PhotosLink","ACARSProcessor.SignalLeveldBm","ACARSProcessor.StationId","ACARSProcessor.TailCode","ACARSProcessor.ThumbnailLink","ACARSProcessor.TrackingLink","ACARSProcessor.TranslateLink","ACARSProcessor.UnixTimestamp"]]}},"additionalProperties":false,"type":"object","required":["Host","Port"]},"ACARSHubConfig":{"properties":{"ACARS":{"$ref":"#/$defs/ACARSConnectionConfig","description":"ACARS-specific settings when connecting to ACARSHub."},"VDLM2":{"$ref":"#/$defs/VDLM2ConnectionConfig","description":"VDLM2-specific settings when connecting to ACARSHub."},"MaxConcurrentRequests":{"type":"integer","description":"Maximum number of requests from ACARSHub to process at once."}},"additionalProperties":false,"type":"object"},"ACARSProcessorDatabaseConfig":{"properties":{"Enabled":{"type":"boolean","description":"Whether or not to use a database to save messages.","default":false},"Type":{"type":"string","description":"Type of database to use","examples":["sqlite","mariadb"]},"ConnectionString":{"type":"string","description":"Connection string (if using an external database)","examples":["user:pass@tcp(127.0.0.1:3306)/dbname?charset=utf8mb4\u0026parseTime=True\u0026loc=Local"]},"SQLiteDatabasePath":{"type":"string","description":"Path to the database file (if using SQLITE). If set to an empty string (\"\"), database will be in-memory only.","default":"./messages.db"}},"additionalProperties":false,"type":"object"},"ACARSProcessorSettings":{"properties":{"ColorOutput":{"type":"boolean","description":"Force whether or not color output is used.","default":true},"Database":{"$ref":"#/$defs/ACARSProcessorDatabaseConfig","description":"Database configuration"},"LogLevel":{"type":"string","description":"Set logging verbosity.","default":"info"},"ProfilingPort":{"type":"integer","description":"Port to listen on for profiling (example: http://localhost:6060/debug/pprof/heap)","default":0},"MessageQueueSize":{"type":"integer","description":"How many messages to queue. If your steps take a long time, recommend no less than 1000. Works out to about 1KB memory used per message (this may become outdated).","default":1000},"LogHideTimestamps":{"type":"boolean","description":"Whether to refrain from printing timestamps in logs.","default":false},"ACARSHub":{"$ref":"#/$defs/ACARSHubConfig","description":"ACARSHub connection settings."}},"additionalProperties":false,"type":"object","required":["ACARSHub"]},"ADSBExchangeAnnotator":{"properties":{"Annotator":true,"Module":true,"APIKey":{"type":"string","description":"APIKey provided by signing up at ADSB-Exchange."},"ReferenceGeolocation":{"type":"string","description":"Geolocation to use for distance calculations (LAT,LON)."},"SelectedFields":{"items":{"type":"string"},"type":"array","description":"Only provide these fields to future steps.","examples":[["ACARSProcessor.AircraftDistanceKm","ACARSProcessor.AircraftDistanceMi","ACARSProcessor.AircraftGeolocation","ACARSProcessor.AircraftLatitude","ACARSProcessor.AircraftLongitude","ADSBExchangeAnnotator.APITimestamp","ADSBExchangeAnnotator.AircraftDistanceKm","ADSBExchangeAnnotator.AircraftDistanceMi","ADSBExchangeAnnotator.AircraftGeolocation","ADSBExchangeAnnotator.AircraftGeolocationLatitude","ADSBExchangeAnnotator.AircraftGeolocationLongitude","ADSBExchangeAnnotator.CacheTime","ADSBExchangeAnnotator.Message","ADSBExchangeAnnotator.ServerProcessingTime","ADSBExchangeAnnotator.TotalAircraftResults"]]}},"additionalProperties":false,"type":"object","required":["APIKey"]},"AnnotateStep":{"properties":{"Tar1090":{"$ref":"#/$defs/Tar1090Annotator","description":"Look up geolocation, including distance from a reference point to aircraft, from a tar1090 instance (which can be self-hosted)"},"ADSB":{"$ref":"#/$defs/ADSBExchangeAnnotator","description":"// Look up geolocation, including distance from a reference point to aircraft, from ADSB-Exchange"}},"additionalProperties":false,"type":"object"},"BuiltinFilter":{"properties":{"Filterer":true,"FilterOnFailure":{"type":"boolean","description":"Whether or not to filter the message if the filter has an error"},"Invert":{"type":"boolean","description":"Inverse logic (for example, Inverse: true, HasText: true means messages with text are FILTERED)"},"HasText":{"type":"boolean","description":"Generic Filters\n\nOnly process messages with text included."},"TailCode":{"type":"string","description":"Only process messages that have this tail code."},"Labels":{"items":{"type":"string"},"type":"array","description":"Only process messages that have one of these labels"},"FlightNumber":{"type":"string","description":"Only process messages that have this flight number."},"ASSStatus":{"type":"string","description":"Only process messages that have ASS Status."},"AboveSignaldBm":{"type":"number","description":"Only process messages that were received above this signal strength (in dBm)."},"BelowSignaldBm":{"type":"number","description":"Only process messages that were received below this signal strength (in dBm)."},"Frequency":{"type":"number","description":"Only process messages received on this frequency."},"StationID":{"type":"string","description":"Only process messages with this station ID."},"FromTower":{"type":"boolean","description":"Only process messages that were from a ground-based transmitter - determined by the presence (From aircraft) or lack of (From ground) a flight number."},"FromAircraft":{"type":"boolean","description":"Only process messages that were from an aircraft - determined by the presence (From aircraft) or lack of (From ground) a flight number."},"More":{"type":"boolean","description":"Only process messages that have the \"More\" flag set."},"AboveDistanceNm":{"type":"number","description":"Only process messages that came from aircraft further than this many nautical miles away (requires ADS-B or tar1090)."},"BelowDistanceNm":{"type":"number","description":"Only process messages that came from aircraft closer than this many nautical miles away (requires ADS-B or tar1090)."},"AboveDistanceMi":{"type":"number","description":"Only process messages that came from aircraft further than this many miles away (requires ADS-B or tar1090)."},"BelowDistanceMi":{"type":"number","description":"Only process messages that came from aircraft closer than this many miles away (requires ADS-B or tar1090)."},"Emergency":{"type":"boolean","description":"Only process messages that have the \"Emergency\" flag set."},"DictionaryPhraseLengthMinimum":{"type":"integer","description":"Only process messages that have at least this many valid dictionary words in a row."},"FreetextTermPresent":{"type":"boolean","description":"Only process messages that have common freetext terms in them. This also looks for messages that start with DISP since just containing DISP is not effective for fiding non-automated messages."},"PreviousMessageSimilarity":{"properties":{"Similarity":{"type":"number"},"MaximumLookBehind":{"type":"integer"},"DontFilterIfLonger":{"type":"boolean"}},"additionalProperties":false,"type":"object","description":"Only process ACARS messages that are at least this percent (ex: 0.8 for 80 percent) different than any other message received."},"RequireAllTerms":{"items":{"type":"string","examples":["[LAV"]},"type":"array","description":"Require all of these terms to be present or else filter the message."},"RequireTerms":{"properties":{"Count":{"type":"integer","examples":[1]},"Terms":{"items":{"type":"string","examples":["[LAV"]},"type":"array"}},"additionalProperties":false,"type":"object","description":"Require at least a certain number of these terms to be present or else filter the message."},"RequireAllRegexMatches":{"items":{"type":"string","examples":["[.*LAV.*"]},"type":"array","description":"Require all of these regex strings to match or else filter the message. If the regex does not compile, the app will not run."},"RequireRegexMatches":{"properties":{"Count":{"type":"integer","examples":[1]},"Terms":{"items":{"type":"string","examples":["[.*LAV.*"]},"type":"array"}},"additionalProperties":false,"type":"object","description":"Require at least a certain number of these regexes to match or else filter the message. If the regex does not compile, the app will not run."}},"additionalProperties":false,"type":"object"},"Color":{"properties":{"R":{"type":"integer"},"G":{"type":"integer"},"B":{"type":"integer"}},"additionalProperties":false,"type":"object"},"Config":{"properties":{"ACARSProcessorSettings":{"$ref":"#/$defs/ACARSProcessorSettings","description":"These control acars-processor itself."},"Steps":{"items":{"$ref":"#/$defs/ProcessingStep"},"type":"array","description":"Actions to take on messages in the order they should be taken."}},"additionalProperties":false,"type":"object","required":["ACARSProcessorSettings"],"description":"Main configuration for acars-processor. Have fun!"},"DiscordReceiver":{"properties":{"Module":true,"Receiver":true,"URL":{"type":"string","description":"Full URL to the Discord webhook for a channel (edit a channel in the Discord UI for the option to create a webhook)."},"Embed":{"type":"boolean","description":"Should an embed be sent instead of a simpler message?","default":true},"EmbedColorFacetFields":{"items":{"type":"string"},"type":"array","description":"Pick one or more fields that deterministically determines the embed color"},"EmbedColorGradientField":{"type":"string","description":"Pick one or more fields that determines the embed color according to this field, which should be an integer between 1 and 100"},"EmbedColorGradientSteps":{"items":{"$ref":"#/$defs/Color"},"type":"array","description":"An array of colors that corresponds with EmbedColorGradientField values"},"FormatText":{"type":"boolean","description":"Surround fields with message content with backticks so they are monospaced and stand out.","default":true},"FormatTimestamps":{"type":"boolean","description":"Add Discord-specific formatting to show human-readable instants from timestamps","default":true},"MessageGoTemplate":{"type":"string","description":"Go template for the message. Insert fields like this: `{{ index . \"ACARSProcessor.TailCode\" }}`","examples":["New message from aircraft! Message is {{ index . \"ACARSProcessor.MessageText\" }}"]}},"additionalProperties":false,"type":"object","required":["URL"]},"FilterStep":{"properties":{"Builtin":{"$ref":"#/$defs/BuiltinFilter","description":"Built-in filters"},"SelectedFields":{"items":{"type":"string"},"type":"array","description":"Remove all but these fields for this filter step. You can have a filter step that only selects fields."}},"additionalProperties":false,"type":"object"},"MastodonReceiver":{"properties":{"Module":true,"Receiver":true,"Server":{"type":"string","description":"Full URL to the Mastodon server","default":"https://mastodon.social","examples":["https://mastodon.social"]},"ClientID":{"type":"string","description":"Get this from your Mastodon server","default":"Get this from your Mastodon server"},"ClientSecret":{"type":"string","description":"Get this from your Mastodon server","default":"Get this from your Mastodon server"},"AccessToken":{"type":"string","description":"Get this from your Mastodon server","default":"Get this from your Mastodon server"},"Visibility":{"type":"string","description":"Visibility for posts. MUST BE ONE OF: public,unlisted,private,direct","default":"unlisted","examples":["public","unlisted","private","direct"]},"PostGoTemplate":{"type":"string","description":"Go template for the post. Insert fields like this: `{{ index . \"ACARSProcessor.TailCode\" }}`","examples":["New message from aircraft! Message is {{ index . \"ACARSProcessor.MessageText\" }}"]}},"additionalProperties":false,"type":"object","required":["Server","ClientID","ClientSecret","AccessToken","Visibility"]},"NewRelicReceiver":{"properties":{"Module":true,"Receiver":true,"APIKey":{"type":"string","description":"API License key to use New Relic."},"CustomEventType":{"type":"string","description":"Name for the custom event type to create (example if set to \"MyCustomACARSEvents\": `FROM MyCustomACARSEvents SELECT count(timestamp)`). If not provided, it will be `CustomACARS`."}},"additionalProperties":false,"type":"object","required":["APIKey"]},"ProcessingStep":{"properties":{"Filter":{"$ref":"#/$defs/FilterStep","description":"Apply one or more filters in this step"},"Annotate":{"$ref":"#/$defs/AnnotateStep","description":"Add annotations from one or more annotators in this step"},"Send":{"$ref":"#/$defs/ReceiverStep","description":"Send the message to one or more receivers in this step"}},"additionalProperties":false,"type":"object"},"ReceiverStep":{"properties":{"Discord":{"$ref":"#/$defs/DiscordReceiver","description":"Send messages to a Discord channel using a webhook created from that channel."},"Mastodon":{"$ref":"#/$defs/MastodonReceiver","description":"Create posts with messages using Mastodon."},"NewRelic":{"$ref":"#/$defs/NewRelicReceiver","description":"Send messages to NewRelic as a custom event type."},"Webhook":{"$ref":"#/$defs/WebHookReceiver","description":"Generic webhook receiver. Please read README for how to use custom payloads."}},"additionalProperties":false,"type":"object"},"Tar1090Annotator":{"properties":{"Annotator":true,"Module":true,"URL":{"type":"string","description":"URL to your tar1090 instance"},"ReferenceGeolocation":{"type":"string","description":"Geolocation to use for distance calculations (LAT,LON)."},"SelectedFields":{"items":{"type":"string"},"type":"array","description":"Only provide these fields to future steps.","examples":[["ACARSProcessor.AircraftDistanceKm","ACARSProcessor.AircraftDistanceMi","ACARSProcessor.AircraftGeolocation","ACARSProcessor.AircraftLatitude","ACARSProcessor.AircraftLongitude","Tar1090.AircraftDistanceKm","Tar1090.AircraftDistanceMi","Tar1090.AircraftGeolocation","Tar1090.AircraftGeolocationLatitude","Tar1090.AircraftGeolocationLongitude","Tar1090.Messages","Tar1090.Now"]]}},"additionalProperties":false,"type":"object","required":["URL"]},"VDLM2ConnectionConfig":{"properties":{"Module":true,"Host":{"type":"string","description":"IP or DNS to your ACARSHub instance serving JSON data from a particular port.","default":"acarshub"},"Port":{"type":"integer","description":"VDLM2 JSON port.","default":15555},"SelectedFields":{"items":{"type":"string"},"type":"array","description":"Only provide these fields to configured steps.","examples":[["ACARSProcessor.ACARSDramaTailNumberLink","ACARSProcessor.FlightNumber","ACARSProcessor.FrequencyHz","ACARSProcessor.FrequencyMHz","ACARSProcessor.From","ACARSProcessor.ImageLink","ACARSProcessor.Label","ACARSProcessor.MessageText","ACARSProcessor.Mode","ACARSProcessor.PhotosLink","ACARSProcessor.SignalLeveldBm","ACARSProcessor.StationId","ACARSProcessor.TailCode","ACARSProcessor.ThumbnailLink","ACARSProcessor.TrackingLink","ACARSProcessor.TranslateLink","ACARSProcessor.UnixTimestamp","VDLM2Message.Model.DeletedAt.Valid","VDLM2Message.Model.ID","VDLM2Message.Processed","VDLM2Message.VDL2.AVLC.ACARS.Acknowledge","VDLM2Message.VDL2.AVLC.ACARS.BlockID","VDLM2Message.VDL2.AVLC.ACARS.CRCOK","VDLM2Message.VDL2.AVLC.ACARS.Error","VDLM2Message.VDL2.AVLC.ACARS.FlightNumber","VDLM2Message.VDL2.AVLC.ACARS.Label","VDLM2Message.VDL2.AVLC.ACARS.MessageNumber","VDLM2Message.VDL2.AVLC.ACARS.MessageNumberSequence","VDLM2Message.VDL2.AVLC.ACARS.MessageText","VDLM2Message.VDL2.AVLC.ACARS.Mode","VDLM2Message.VDL2.AVLC.ACARS.More","VDLM2Message.VDL2.AVLC.ACARS.Registration","VDLM2Message.VDL2.AVLC.CR","VDLM2Message.VDL2.AVLC.Destination.Address","VDLM2Message.VDL2.AVLC.Destination.Type","VDLM2Message.VDL2.AVLC.FrameType","VDLM2Message.VDL2.AVLC.Poll","VDLM2Message.VDL2.AVLC.RSequence","VDLM2Message.VDL2.AVLC.SSequence","VDLM2Message.VDL2.AVLC.Source.Address","VDLM2Message.VDL2.AVLC.Source.Status","VDLM2Message.VDL2.AVLC.Source.Type","VDLM2Message.VDL2.App.ACARSRouterUUID","VDLM2Message.VDL2.App.ACARSRouterVersion","VDLM2Message.VDL2.App.Name","VDLM2Message.VDL2.App.Proxied","VDLM2Message.VDL2.App.ProxiedBy","VDLM2Message.VDL2.App.Version","VDLM2Message.VDL2.BurstLengthOctets","VDLM2Message.VDL2.FrequencyHz","VDLM2Message.VDL2.FrequencySkew","VDLM2Message.VDL2.HDRBitsFixed","VDLM2Message.VDL2.Index","VDLM2Message.VDL2.NoiseLevel","VDLM2Message.VDL2.OctetsCorrectedByFEC","VDLM2Message.VDL2.SignalLevel","VDLM2Message.VDL2.Station","VDLM2Message.VDL2.Timestamp.Microseconds","VDLM2Message.VDL2.Timestamp.UnixTimestamp"]]}},"additionalProperties":false,"type":"object","required":["Host","Port"]},"WebHookReceiver":{"properties":{"Module":true,"Receiver":true,"URL":{"type":"string","description":"URL, including port and params, to the desired webhook.","examples":["https://webhook:8443/webhook/?enable_feature=yes"]},"Method":{"type":"string","description":"Method when calling webhook (GET,POST,PUT etc).","default":"POST"},"Headers":{"items":{"$ref":"#/$defs/WebHookReceiverHeaders"},"type":"array","description":"Additional headers to send along with the request."},"PayloadGoTemplate":{"type":"string","description":"Go template for the post. Use dot notation with double curly braces to insert fields (`{{ .ACARSProcessor.MessageText }}`)","examples":["{\"tail_code\": \"{{ index . \"ACARSProcessor.TailCode\" }}\"}"]}},"additionalProperties":false,"type":"object","required":["URL","Method","PayloadGoTemplate"]},"WebHookReceiverHeaders":{"properties":{"Name":{"type":"string","description":"Header name."},"Value":{"type":"string","description":"Header value."}},"additionalProperties":false,"type":"object","required":["Name","Value"]}}}