Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Custom Entity Type RMP Kiosk Entity #1891

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JimHagan
Copy link

@JimHagan JimHagan commented Jan 31, 2025

Relevant information

This is built off Log data representing various events related to custom device types. In this initial commit we are only focusing on the CSO or "Kiosk" device type.

Example ID: "USAS00001CSO33"

Where:

country = "USA"
store.number = "00001"
device.type = "CSO"
device.number = "33"

In general these are 1:1 related with a host but we do not define the relationship yet. The golden singles are some log counts with various facets.

Checklist

  • I've read the guidelines and understand the acceptance criteria.
  • The value of the attribute marked as identifier will be unique and valid.
  • I've confirmed that my entity type wasn't already defined. If it is I'm providing an explanation above.

About the Source Data

The source data for this entity will come from Log. Each candidate will contain the necessary components as defined in the synthesis rule. This simple count query facets by all necessary elements:

FROM Log SELECT count(*) where device.type = 'CSO' facet country, store.number, device.type, device.number

USA,07001,CSO,22,1552
USA,00268,CSO,27,1449
USA,00268,CSO,33,1358
USA,07027,CSO,44,1353
USA,01551,CSO,77,1335
USA,07105,CSO,88,1317
USA,07071,CSO,99,1280
USA,07028,CSO,15,1252
USA,07010,CSO,12,1233
USA,07013,CSO,11,1217

The follwoing raw sample data can be used to validate the synthesis rules. This is a "fake store" at the geographical cetner of the USA:

  {
            "@timestamp": "2025-02-01T13:11:03.360Z",
            "country": "USA",
            "device.number": "33",
            "device.type": "CSO",
            "geo.location.lat": "41.850033",
            "geo.location.lon": "0.066515",
            "host.ip": "192.0.2.1",
            "hostname": "USAS00001CSO33",
            "level": "ERROR",
            "message": "Unable to Process Payment for Product: Potato Chips",
            "newrelic.source": "api.logs",
            "service.name": "Purchase-Service",
            "store.number": "00001",
            "timestamp": 1738415463360
          }

Note that there is an implicit 1:1 relationship with a host. For this reason we'll use the hostname attribute as the ID. That will allow us make queries from SystemSample and other host related events (from NR infrastructure agent) and infer insights about the specific Kiosk that lives on that host.

For example:

FROM SystemSample select latest(cpuPercent), latest(memoryUsedBytes) where hostname = 'USAS00001CSO33'

In subsequent revisions we will explore creating a more formal relationship between the Kiosk device and it's related host.

Copy link

@entityBot entityBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beep boop bop.

I have found some errors processing these changes:

* Error PARSING domainType: 'ext-rmp-kiosk' on entitydefinitionemitter.models.BaseEntityDefinition - jackson.databind.exc.MismatchedInputException: Missing required creator property 'name' (index 0)
at [Source: (StringReader); line: 15, column: 3] (through reference chain: entitydefinitionemitter.models.BaseEntityDefinition["synthesis"]->entitydefinitionemitter.models.CustomEntitySynthesisRules["rules"]->ArrayList[0]->entitydefinitionsclientsynthesis.models.definitions.EntitySynthesisRule["name"])

github-actions[bot]
github-actions bot previously approved these changes Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants