macOS integration for Grafana Cloud

The macOS integration uses the agent to collect metrics related to the operating system, including aspects like CPU usage, load average, memory usage, and disk and networking I/O. It also supports system logs being scraped by the agent using promtail. An accompanying dashboard is provided to visualize these metrics and logs.

Install macOS integration for Grafana Cloud

  1. In your Grafana instance, Click Integrations and Connections (lightning bolt icon), then click on install integration on macOS tile.
  2. Wait for the integration to be installed and then follow the steps shown to setup Grafana Agent to automatically scrape and send macOS metrics to your Cloud Instance.

Post-install configuration for the macOS integration

This integration supports metrics and logs from macOS. In order to see logs and metrics signals correlated on the same dashboard, you need to make sure that job and instance labels match in the node_exporter integration config and under logs. The job label should be set to integrations/macos-node. The following preferred agent configuration example includes logs collected.

Note: You must replace placeholder ‘<this_mac_hostname>’ with the appropriate hostname for your configuration needs:

    - url: http://cortex:9009/api/prom/push
    enabled: true
    - replacement: <this_mac_hostname>
      source_labels: [agent_hostname]
      target_label: instance
    - replacement: "integrations/macos-node"
      source_labels: [agent_hostname]
      target_label: job

  - name: integrations
    - url: http://loki:3100/loki/api/v1/push
      filename: /tmp/positions.yaml
      sync_period: 10s
    - job_name: integrations/node_exporter_direct_scrape
      - targets:
        - localhost
          instance: <this_mac_hostname>
          __path__: /var/log/*.log
          job: integrations/macos-node
      - multiline:
          firstline: '^([\w]{3} )?[\w]{3} +[\d]+ [\d]+:[\d]+:[\d]+|[\w]{4}-[\w]{2}-[\w]{2} [\w]{2}:[\w]{2}:[\w]{2}(?:[+-][\w]{2})?'
      - regex:
          expression: '(?P<timestamp>([\w]{3} )?[\w]{3} +[\d]+ [\d]+:[\d]+:[\d]+|[\w]{4}-[\w]{2}-[\w]{2} [\w]{2}:[\w]{2}:[\w]{2}(?:[+-][\w]{2})?) (?P<hostname>\S+) (?P<sender>.+?)\[(?P<pid>\d+)\]:? (?P<message>(?s:.*))$'
      - labels:
      - match:
          selector: '{sender!="", pid!=""}'
            - template:
                source: message
                template: '{{.sender }}[{{.pid}}]: {{ .message }}'
            - labeldrop:
                - pid
            - output:
                source: message

Note that on Macs with an M1 architecture you might encounter errors similar to the following:

level=error integration=node_exporter msg="collector failed" name=thermal duration_seconds=0.001089125 err="no CPU power status has been recorded"

To avoid collector errors, you can add disable_collectors setting to the node_exporter integration to disable it:

      - thermal # disable on M1


This integration includes the following dashboards.

  • Node Exporter / MacOS

MacOS overview


MacOS logs



Below is a list of the metrics used on the dashboards and in alerts of the integration and are automatically written to your Grafana Cloud instance.

  • node_cpu_seconds_total
  • node_disk_io_time_seconds_total
  • node_disk_io_time_weighted_seconds_total
  • node_disk_read_bytes_total
  • node_disk_written_bytes_total
  • node_filesystem_avail_bytes
  • node_filesystem_files
  • node_filesystem_files_free
  • node_filesystem_readonly
  • node_filesystem_size_bytes
  • node_load1
  • node_load15
  • node_load5
  • node_memory_Buffers_bytes
  • node_memory_Cached_bytes
  • node_memory_MemAvailable_bytes
  • node_memory_MemFree_bytes
  • node_memory_MemTotal_bytes
  • node_memory_Slab_bytes
  • node_memory_compressed_bytes
  • node_memory_internal_bytes
  • node_memory_purgeable_bytes
  • node_memory_total_bytes
  • node_memory_wired_bytes
  • node_network_receive_bytes_total
  • node_network_receive_drop_total
  • node_network_receive_errs_total
  • node_network_receive_packets_total
  • node_network_transmit_bytes_total
  • node_network_transmit_drop_total
  • node_network_transmit_errs_total
  • node_network_transmit_packets_total
  • node_textfile_scrape_error
  • node_uname_info
  • node_vmstat_pgmajfault


The integration also comes packaged with a number of handy alerts.

Group: node-exporter

NodeFilesystemAlmostOutOfSpaceWarning: Filesystem has less than 5% space left.
NodeFilesystemAlmostOutOfSpaceCritical: Filesystem has less than 3% space left.
NodeFilesystemFilesFillingUpWarning: Filesystem is predicted to run out of inodes within the next 24 hours.
NodeFilesystemFilesFillingUpCritical: Filesystem is predicted to run out of inodes within the next 4 hours.
NodeFilesystemAlmostOutOfFilesWarning: Filesystem has less than 5% inodes left.
NodeFilesystemAlmostOutOfFilesCritical: Filesystem has less than 3% inodes left.
NodeNetworkReceiveErrsWarning: Network interface is reporting many receive errors.
NodeNetworkTransmitErrsWarning: Network interface is reporting many transmit errors.
NodeTextFileCollectorScrapeErrorWarning: Node Exporter text file collector failed to scrape.


# 0.0.5 - September 2022

* Update dashboard panels descriptions.

# 0.0.4 - May 2022

* Reverse fsSpaceAvailableCriticalThreshold and fsSpaceAvailableWarningThreshold
* Update units for disk and networking panels

# 0.0.3 - May 2022

* Use $(hostname) in the generated agent config to avoid manual snippet editing

# 0.0.2 - May 2022

* Update timestamp parsing in logs

# 0.0.1 - May 2022

* Initial release


By connecting your macOS instance to Grafana Cloud you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see Active series and dpm usage and Cloud tier pricing.