Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tommyers-elastic
Copy link
Contributor

@tommyers-elastic tommyers-elastic commented Sep 10, 2024

Proposed commit message

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

device_health_dashboard

@andrewkroh andrewkroh added the New Integration Issue or pull request for creating a new integration package. label Sep 10, 2024
@gpop63
Copy link
Contributor

gpop63 commented Sep 13, 2024

Here's the full mappings, hopefully I didn't miss any. Tried to add unit and metric_type as well where it makes sense. Also renamed some metrics that were misspelled like latancy and left a review in beats as well.

Details

- name: meraki
  type: group
  fields:
    - name: organization_id
      type: keyword
      dimension: true
    - name: device
      type: group
      fields:      
        - name: serial
          type: keyword
          dimension: true
        - name: address
          type: keyword
        - name: firmware
          type: keyword
        - name: imei
          type: keyword
        - name: lan_ip
          type: ip
        - name: location
          type: keyword
        - name: mac
          type: keyword
          dimension: true
        - name: model
          type: keyword
        - name: name
          type: keyword
        - name: network_id
          type: keyword
          dimension: true
        - name: notes
          type: keyword
        - name: product_type
          type: keyword
        - name: tags
          type: keyword
        - name: details
          type: object
        - name: status
          type: group
          fields:
            - name: gateway
              type: ip
            - name: ip_type
              type: keyword
            - name: last_reported_at
              type: date
            - name: primary_dns
              type: keyword
            - name: public_ip
              type: ip
            - name: secondary_dns
              type: keyword
            - name: value
              type: keyword
    - name: uplink
      type: group
      fields:
        - name: high_availablity
          type: group
          fields:
            - name: enabled
              type: boolean
            - name: role
              type: keyword
        - name: last_reported_at
          type: date
        - name: interface
          type: keyword
          dimension: true
        - name: status
          type: keyword
        - name: ip
          type: ip
        - name: gateway
          type: ip
        - name: public_ip
          type: ip
        - name: primary_dns
          type: keyword
        - name: secondary_dns
          type: keyword
        - name: ip_assigned_by
          type: keyword
        - name: loss_latency
          type: group
          fields:
            - name: ip
              type: ip
            - name: loss_percent
              type: float
              metric_type: gauge
              unit: percent
            - name: latency_ms
              type: float
              metric_type: gauge
              unit: ms
    - name: cellular
      type: group
      fields:
        - name: gateway
          type: group
          fields:
            - name: uplink
              type: group
              fields:
                - name: network_id
                  type: keyword
                  dimension: true
                - name: last_reported_at
                  type: date
                - name: apn
                  type: keyword
                - name: connection_type
                  type: keyword
                - name: dns1
                  type: keyword
                - name: dns2
                  type: keyword
                - name: gateway
                  type: ip
                - name: iccid
                  type: keyword
                  dimension: true
                - name: interface
                  type: keyword
                - name: ip
                  type: ip
                - name: model
                  type: keyword
                - name: provider
                  type: keyword
                - name: public_ip
                  type: ip
                - name: signal_stat
                  type: group
                  fields:
                    - name: rsrp
                      type: float
                      metric_type: gauge
                    - name: rsrq
                      type: float
                      metric_type: gauge
                - name: signal_type
                  type: keyword
                - name: status
                  type: keyword
    - name: network
      type: group
      fields:
        - name: appliance
          type: group
          fields:
            - name: vpn
              type: group
              fields:
                - name: site_to_site
                  type: group
                  fields:
                    - name: network_id
                      type: keyword
                      dimension: true
                    - name: mode
                      type: keyword
                    - name: hub
                      type: group
                      fields:
                        - name: hub_id
                          type: keyword
                        - name: use_default_route
                          type: boolean
                    - name: subnet
                      type: group
                      fields:
                        - name: local_subnet
                          type: ip_range
                        - name: use_vpn
                          type: boolean
        - name: health
          type: group
          fields:
            - name: channel
              type: group
              fields:
                - name: radio
                  type: group
                  fields:
                    - name: serial
                      type: keyword
                      dimension: true
                    - name: model
                      type: keyword
                    - name: tags
                      type: keyword
                    - name: wifi0
                      type: group
                      fields:
                        - name: start_time
                          type: date
                        - name: end_time
                          type: date
                        - name: utilization80211
                          type: float
                          metric_type: gauge
                          unit: percent
                        - name: utilizationNon80211
                          type: float
                          metric_type: gauge
                          unit: percent
                        - name: utilizationTotal
                          type: float
                          metric_type: gauge
                          unit: percent
                    - name: wifi1
                      type: group
                      fields:
                        - name: start_time
                          type: date
                        - name: end_time
                          type: date
                        - name: utilization80211
                          type: float
                          metric_type: gauge
                          unit: percent
                        - name: utilizationNon80211
                          type: float
                          metric_type: gauge
                          unit: percent
                        - name: utilizationTotal
                          type: float
                          metric_type: gauge
                          unit: percent
    - name: switch
      type: group
      fields:
        - name: port
          type: group
          fields:
            - name: port_id
              type: keyword
              dimension: true
            - name: name
              type: keyword
            - name: tags
              type: keyword
            - name: enabled
              type: boolean
            - name: poe_enabled
              type: boolean
            - name: vlan
              type: integer
            - name: voice_vlan
              type: integer
            - name: allowed_vlans
              type: keyword
            - name: rstp_enabled
              type: boolean
            - name: stp_guard
              type: keyword
            - name: link_negotiation
              type: keyword
            - name: access_policy_type
              type: keyword
            - name: sticky_mac_allow_list
              type: keyword
            - name: sticky_mac_allow_list_limit
              type: integer
            - name: status
              type: group
              fields:
                - name: enabled
                  type: boolean
                - name: status
                  type: keyword
                - name: spanning_tree
                  type: group
                  fields:
                    - name: statuses
                      type: keyword
                - name: is_uplink
                  type: boolean
                - name: errors
                  type: keyword
                - name: warnings
                  type: keyword
                - name: speed
                  type: keyword
                - name: duplex
                  type: keyword
                - name: usage_in_kb
                  type: group
                  fields:
                    - name: sent
                      type: long
                      unit: byte
                    - name: recv
                      type: long
                      unit: byte
                    - name: total
                      type: long
                      unit: byte
                - name: client_count
                  type: integer
                  metric_type: gauge
                - name: power_usage_in_wh
                  type: float
                  metric_type: gauge
                - name: traffic_in_kbps
                  type: group
                  fields:
                    - name: total
                      type: float
                      metric_type: gauge
                      unit: byte
                    - name: sent
                      type: float
                      metric_type: gauge
                      unit: byte
                    - name: recv
                      type: float
                      metric_type: gauge
                      unit: byte
                - name: secure_port
                  type: group
                  fields:
                    - name: enabled
                      type: boolean
                    - name: active
                      type: boolean
                    - name: authentication_status
                      type: keyword
                    - name: config_overrides
                      type: group
                      fields:
                        - name: type
                          type: keyword
                        - name: vlan
                          type: integer
                        - name: voice_vlan
                          type: integer
                        - name: allowed_vlans
                          type: keyword
                - name: cdp
                  type: group
                  fields:
                    - name: system_name
                      type: keyword
                    - name: platform
                      type: keyword
                    - name: device_id
                      type: keyword
                    - name: port_id
                      type: keyword
                    - name: native_vlan
                      type: integer
                    - name: address
                      type: ip
                    - name: management_address
                      type: ip
                    - name: version
                      type: keyword
                    - name: vtp_management_domain
                      type: keyword
                    - name: capabilities
                      type: keyword
                - name: lldp
                  type: group
                  fields:
                    - name: system_name
                      type: keyword
                    - name: system_description
                      type: keyword
                    - name: chassis_id
                      type: keyword
                    - name: port_id
                      type: keyword
                    - name: management_vlan
                      type: integer
                    - name: port_vlan
                      type: integer
                    - name: management_address
                      type: ip
                    - name: port_description
                      type: keyword
                    - name: system_capabilities
                      type: keyword
    - name: wireless
      type: group
      fields:
        - name: device
          type: group
          fields:
            - name: channel
              type: group
              fields:
                - name: utilization
                  type: object
    - name: appliance
      type: group
      fields:
        - name: network
          type: group
          fields:
            - name: port
              type: group
              fields:
                - name: number
                  type: integer
                - name: enabled
                  type: boolean
                - name: type
                  type: keyword
                - name: drop_untagged_traffic
                  type: boolean
                - name: vlan
                  type: integer
                - name: allowed_vlans
                  type: keyword
                - name: access_policy
                  type: keyword
    - name: license
      type: group
      fields:
        - name: device_model
          type: keyword
        - name: expiration_date
          type: date
        - name: status
          type: keyword
        - name: count
          type: long
          metric_type: gauge
        - name: state
          type: keyword
        - name: expiration_state
          type: keyword
        - name: expiration_threshold_days
          type: long
        - name: soonest_activation_date
          type: date
        - name: soonest_activation_count
          type: long
          metric_type: gauge
        - name: oldest_activation_date
          type: date
        - name: oldest_activation_count
          type: long
          metric_type: gauge
        - name: type
          type: keyword
        - name: systems_manager
          type: group
          fields:
            - name: active_seats
              type: long
              metric_type: gauge
            - name: org_wide_enrolled_devices
              type: long
              metric_type: gauge
            - name: total_seats
              type: long
              metric_type: gauge
            - name: unassigned_seats
              type: long
              metric_type: gauge

@gpop63
Copy link
Contributor

gpop63 commented Sep 30, 2024

I added agent fields mappings (048665e) because we need mappings for host.mac and host.ip. Right now it might contain fields that we don't need for this integration but I'll leave it for now and come back to it in the final review. More on this issue can be read here.

elastic-package test static -v

2024/09/30 20:45:55  WARN CommitHash is undefined, in both /home/gab/.elastic-package/version and the compiled binary, config may be out of date.
2024/09/30 20:45:55 DEBUG Enable verbose logging
2024/09/30 20:45:55 DEBUG latest version (cached): v0.104.0. Download from: https://github.com/elastic/elastic-package/releases/tag/v0.104.0 (Timestamp 2024-09-30 20:22:06.351051917 +0300 EEST)
2024/09/30 20:45:55  INFO New version is available - v0.104.0. Download from: https://github.com/elastic/elastic-package/releases/tag/v0.104.0
Run static tests for the package
2024/09/30 20:45:55 DEBUG Imported ECS fields definition from external schema for validation (embedded in package: false, stack uses ecs@mappings template: true)
--- Test results for package: cisco_meraki_metrics - START ---
FAILURE DETAILS:
cisco_meraki_metrics/device_health Verify sample_event.json:
[0] field "host.ip" is not normalized as expected: expected array, found "172.21.0.4" (string)
[1] field "host.mac" is not normalized as expected: expected array, found "02-42-AC-15-00-04" (string)


╭──────────────────────┬───────────────┬───────────┬──────────────────────────┬────────────────────────────────────────────┬──────────────╮
│ PACKAGE              │ DATA STREAM   │ TEST TYPE │ TEST NAME                │ RESULT                                     │ TIME ELAPSED │
├──────────────────────┼───────────────┼───────────┼──────────────────────────┼────────────────────────────────────────────┼──────────────┤
│ cisco_meraki_metrics │ device_health │ static    │ Verify sample_event.json │ FAIL: one or more errors found in document │  55.100145ms │
╰──────────────────────┴───────────────┴───────────┴──────────────────────────┴────────────────────────────────────────────┴──────────────╯
--- Test results for package: cisco_meraki_metrics - END   ---
Done
Error: one or more test cases failed

@tommyers-elastic
Copy link
Contributor Author

@gpop63 do we need all the extra mappings, or can we get away with just host.ip and host.mac?

@shmsr
Copy link
Member

shmsr commented Oct 3, 2024

I've added some comments. Everything else looks good!

Co-authored-by: subham sarkar <[email protected]>
- security
conditions:
kibana:
version: "^8.15.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI - we need to leave this at 8.15.2 for this to work with the 8.15.2-SNAPSHOT build, but we should be aware that this will NOT work with the public 8.15.2 version. because this is a beta package this is ok, but as soon as 8.15.3 is released we need to bump this version to 8.15.3. please open a ticket on this so we don't forget. thanks!!

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

@shmsr shmsr left a comment

Choose a reason for hiding this comment

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

I've put one comment. Rest LGTM. Approving!

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
76.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@elasticmachine
Copy link

💚 Build Succeeded

History

@agithomas
Copy link
Contributor

Can we consider re-arranging the order of the input control selector to a more hierarchical ordering
Organisation ID -> Device Model -> Device Name -> Device Serial Number?

- name: voice_vlan
type: long
description: The voice VLAN of the switch port. Only applicable to access ports.
- name: status
Copy link
Contributor

Choose a reason for hiding this comment

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

In the dashboard, can we maintain a table to display all the statuses (client count, duplex, errors, is_uplink, power_usage_in_wh, speed, status, warning, stp_statuuses) for the specific device ?

"stop": 3.33
},
{
"color": "#d6bf57",
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it be good to show the list of devices that are not in Green status?

"palette": {
"name": "custom",
"params": {
"colorStops": [
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it be good to show the list of devices having unlink latency outside the green status?

@agithomas
Copy link
Contributor

Please consider adding the unit of the metric, either in the Y-axis or in the panel title label.

Example: Switch port data throughput, Channel utilisation, Switch Port power usage

}
],
"timeRestore": false,
"title": "[Metrics Cisco Meraki] Device Health Overview",
Copy link
Contributor

Choose a reason for hiding this comment

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

In the screenshot file, the name is appearing as Device Health Overview(1). Looks like the screenshot was taken from a cloned dashboard.

- name: enabled
type: boolean
description: Whether the port is configured to be enabled.
- name: errors
Copy link
Contributor

Choose a reason for hiding this comment

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

Kindly include a metric visualisation to capture this information.

Copy link
Contributor

Choose a reason for hiding this comment

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

If there is a possibility of recurring errors, showing the trend of errors using a line visualisation can be considered.

- name: status
type: keyword
description: The current connection status of the port.
- name: warnings
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the errors (please see the above comment), showing the number of warnings or trend of the warnings will be helpful

- name: voice_vlan
type: long
description: The voice VLAN of the . Only applicable to access ports.
- name: throughput
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we consider including throughput values in the dashboard?

@agithomas
Copy link
Contributor

Please revisit the logo used. I guess, there exist a more relevant one.

@agithomas
Copy link
Contributor

Please revisit the logo used. I guess, there exist a more relevant one.

I understand that the current logo is selected to be consistent with other cisco integrations. Marking it as resolved.

@gpop63 gpop63 merged commit 51d4eb9 into elastic:main Oct 4, 2024
4 of 5 checks passed
@elastic-vault-github-plugin-prod

Package cisco_meraki_metrics - 0.1.0 containing this change is available at https://epr.elastic.co/search?package=cisco_meraki_metrics

@andrewkroh andrewkroh added the Integration:cisco_meraki_metrics Cisco Meraki Metrics label Oct 4, 2024
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
* meraki metrics package initial commit

* fix metricset name

* fix indentation of 'uplink' field mappings

* Update packages/cisco_meraki_metrics/changelog.yml

Co-authored-by: Ishleen Kaur <[email protected]>

* update mappings

* fix validation errors in mappings

* add store:true to text mappings to allow integration install

* add fields descriptions

* add sample event

* add ecs version

* update readme docs

* add missing unit mappings

* improve titles and descriptions

* fix owner
add CODEOWNERS entry

* automatic lint

* add organization_id field

* add agent fields

* add ecs field reference in docs

* add ingest pipeline
transforms uplink loss pct field
converts rsrp and rsrq to floats

* fix field types
fix descriptions

* remove unused agent fields

* add tags and processors

* add configuration steps in docs

* make organizations an array in agent config

* add dashboard

* use average instead of sum for uplink latency

* add device map lens

* update dashboard
add dashboard image in integration
remove old dashboard
remove sample screenshot

* capitalize 'metrics' in integration title

* fix dashboard title

* delete wrongly added dashboard

* address reviews

* Update version to 0.1.0

Co-authored-by: subham sarkar <[email protected]>

* fix manifest version

---------

Co-authored-by: Ishleen Kaur <[email protected]>
Co-authored-by: Gabriel Pop <[email protected]>
Co-authored-by: subham sarkar <[email protected]>
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
* meraki metrics package initial commit

* fix metricset name

* fix indentation of 'uplink' field mappings

* Update packages/cisco_meraki_metrics/changelog.yml

Co-authored-by: Ishleen Kaur <[email protected]>

* update mappings

* fix validation errors in mappings

* add store:true to text mappings to allow integration install

* add fields descriptions

* add sample event

* add ecs version

* update readme docs

* add missing unit mappings

* improve titles and descriptions

* fix owner
add CODEOWNERS entry

* automatic lint

* add organization_id field

* add agent fields

* add ecs field reference in docs

* add ingest pipeline
transforms uplink loss pct field
converts rsrp and rsrq to floats

* fix field types
fix descriptions

* remove unused agent fields

* add tags and processors

* add configuration steps in docs

* make organizations an array in agent config

* add dashboard

* use average instead of sum for uplink latency

* add device map lens

* update dashboard
add dashboard image in integration
remove old dashboard
remove sample screenshot

* capitalize 'metrics' in integration title

* fix dashboard title

* delete wrongly added dashboard

* address reviews

* Update version to 0.1.0

Co-authored-by: subham sarkar <[email protected]>

* fix manifest version

---------

Co-authored-by: Ishleen Kaur <[email protected]>
Co-authored-by: Gabriel Pop <[email protected]>
Co-authored-by: subham sarkar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:cisco_meraki_metrics Cisco Meraki Metrics New Integration Issue or pull request for creating a new integration package. Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants