Skip to content

Commit

Permalink
First draft for review
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleycamacho committed Mar 20, 2024
1 parent 9f47881 commit c06331b
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/install/config/windows-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
agentName: windows-service
agentType: integration
title: 'Windows service monitoring integration'
metaDescription: 'Install the Windows service integration'
introFilePath: 'src/install/windows-service/intro.mdx'
appInfo:
- optionType: dropdown1
label: ''
placeholder: 'Select your environment'
options:
- value: 'windows'
displayName: 'Windows'
logo: 'windows'

steps:
- filePath: 'src/install/windows-service/install-infra.mdx'
- filePath: 'src/install/windows-service/install-integration.mdx'
- filePath: 'src/install/windows-service/configure-integration.mdx'
whatsNextFilePath: 'src/install/windows-service/whatsNext.mdx'
9 changes: 9 additions & 0 deletions src/install/windows-service/appInfo.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
componentType: appInfoConfig
headingText: Choose your framework
---





40 changes: 40 additions & 0 deletions src/install/windows-service/configure-integration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
componentType: default
headingText: Configure the integration
---



To enable the integration, edit and save the `winservices-config.yml`:

* Uncomment `exporter_bind_address:` and `exporter_bind_port:`
* Add the name of the services you want to monitor to `include_matching_entities:`

By default, no service is included. To include and filter services, you must edit `include_matching_entities:`.

Also, the configuration option [`inventory_source`](/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format) is not compatible with the integration.

Here's an example of the Windows services integration configuration with both a regex pattern matching all services named `win32.*` and a direct match for the `newrelic-infra` service:

<CollapserGroup>
<Collapser
id="example"
title="winservices-config.yml"
>
```yml
integrations:
- name: nri-winservices
config:
exporter_bind_address: 127.0.0.1
exporter_bind_port: 9182
include_matching_entities:
windowsService.name:
- regex "win32.*"
- "newrelic-infra"
scrape_interval: 30s
timeout: 60s
```
For more information, see our documentation about the [general structure of on-host integration configurations](/docs/integrations/integrations-sdk/file-specifications/host-integration-configuration-overview).
</Collapser>
</CollapserGroup>
8 changes: 8 additions & 0 deletions src/install/windows-service/install-infra.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
componentType: default
headingText: Install the infrastructure agent
---

To use the Apache Flink integration, you need to also [install the infrastructure agent](/docs/infrastructure/install-infrastructure-agent/get-started/install-infrastructure-agent-new-relic/) on the same host. The infrastructure agent monitors the host itself, while the integration you'll install in the next step extends your monitoring with specific data such as database and instance metrics.

You must have <DoNotTranslate>**version 1.12.1 or higher**</DoNotTranslate> for our [infrastructure monitoring agent](/docs/infrastructure/install-infrastructure-agent/windows-installation/install-infrastructure-monitoring-agent-windows) installed on a supported host. The x86 Windows versions are not yet supported.
19 changes: 19 additions & 0 deletions src/install/windows-service/install-integration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
componentType: default
headingText: Install the Windows services integration
---

To install the Windows services integration:

1. Change the directory to the integrations folder:

```shell
cd C:\Program Files\New Relic\newrelic-infra\integrations.d\
```

2. Copy the sample configuration file:

```shell
copy winservices-config.yml.sample winservices-config.yml
```
3. Edit the `winservices-config.yml` file as described in the [configuration settings](#config) and save it.
15 changes: 15 additions & 0 deletions src/install/windows-service/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
headingText: Before we start
componentType: default
---

import infrastructureWindowsServicesMetric from 'images/infrastructure_screenshot-crop_windows-services-metric.webp'

New Relic's Windows services integration collects data about the services running on your Microsoft Windows hosts and sends it to our platform. You can check the state and start mode of each service, find out which hosts are running a service, set up <InlinePopover type="alerts" /> for services, and more.

<img
title="New Relic - Windows services integration - Metric data"
alt="New Relic - Windows services integration - Metric data"
src={infrastructureWindowsServicesMetric}
/>

108 changes: 108 additions & 0 deletions src/install/windows-service/whatsNext.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
componentType: default
headingText: Metrics collected by the integration
---


## How it works [#process]

To get data from Windows hosts, our Windows services integration uses a reduced version of the [Prometheus exporter for Windows](https://github.com/prometheus-community/windows_exporter), which exposes Prometheus metrics on the port specified in the agent configuration. The integration collects these metrics, transforms them into entities, filters them, and then sends them to New Relic.

<img
title="Windows services integration architecture"
alt="Windows services integration architecture"
src={infrastructureWindowsServices}
/>

<figcaption>
The Windows services integration collects [Service Functions](https://docs.microsoft.com/en-us/windows/win32/services/service-functions) data using the Windows Prometheus exporter. It then transforms and filters the data before sending it to New Relic.
</figcaption>

## Metric data [#metrics]

The Windows services integration provides the following data:

<Callout variant="tip">
This integration creates dimensional metrics, which return the numeric status supplied by the [Win32_Service class](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-service). Enumeration of these metrics into readable string values is provided under the `start_mode` and `state` attributes.
</Callout>

<table>
<thead>
<tr>
<th>
Metric Name
</th>

<th>
Enumerated Attribute
</th>

<th>
Description
</th>
</tr>
</thead>

<tbody>
<tr>
<td>
`windows_service_start_mode`
</td>

<td>
`start_mode`
</td>

<td>
Start mode of the service. Possible values are:

* `boot`
* `system`
* `auto`
* `manual`
* `disabled`
</td>
</tr>

<tr>
<td>
`windows_service_state`
</td>

<td>
`state`
</td>

<td>
State of the service. Possible values are:

* `stopped`
* `start pending`
* `stop pending`
* `running`
* `continue pending`
* `pause pending`
* `paused`
* `unknown`
</td>
</tr>
</tbody>
</table>

## Metadata [#metadata]

The Windows services integration sends the following metadata to New Relic:

* `display_name`: Name of the service as viewed in the services snap-in.
* `process_id`: Process identifier of the service.
* `run_as`: Account name under which a service runs. Depending on the service type, the format of the account name may be `DomainName\Username` or `Username@DomainName` (UPN). The value is taken from the `StartName` attribute of the `Win32_Service` class, which can be `NULL` (in that case, the label is reported as an empty string).
* `service_name`: Unique identifier of the service.

<Callout variant="important">
If the `StartName` attribute is `NULL`, the service is logged on under the `LocalSystem` account. For kernel or system-level drive, it runs with a default object name created by the I/O system based on the service name, for example, `DWDOM\Admin`.
</Callout>

## Source code [#open-source]

The Windows services integration is open source software. That means you can [browse its source code](https://github.com/newrelic/nri-winservices/) and [send improvements](https://github.com/newrelic/nri-winservices/blob/master/CONTRIBUTING.md), or create your own fork and build it. For more information, see the [README](https://github.com/newrelic/nri-winservices/blob/master/README.md).

0 comments on commit c06331b

Please sign in to comment.