# License Key

Pipekit will not function without a valid license key. You can obtain a license key and the associated terms by contacting us at <hello@pipekit.io> or through your Slack support channel.

Without a valid key, users will be prevented from authenticating with Pipekit, and the Pipekit Agent will not be able to communicate with the Pipekit service.

## Applying the License Key

To apply the license key, you will need to set the `global.licenseKey` value in your Helm Chart to the key provided by Pipekit.

## Monitoring for License Expiry

The `users` service within the Pipekit deployment will output the number of seconds until the license expires, as a metric. You can monitor this metric to ensure that your license does not expire. Metrics for the users service are available at the `/metrics` endpoint of the users service on port 9090.

### Example Prometheus Rules

The example below will issue a warning alert when your Pipekit license is due to expire in 30 days, and a critical alert if within 14 days. You can adjust the `expr` field to change the number of days before expiry that the alert is triggered.

```yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: pipekit-license-expiry
spec:
  groups:
    - name: pipekit-license
      rules:
        - alert: expiresIn90Days
          annotations:
            description: "The license key for your Pipekit installation will expire in less than 30 days. Please renew the license key to avoid any disruptions. Email hello@pipekit.io for more information."
            summary: The Pipekit license key will expire in less than 30 days.
          expr: |-
            users_license_seconds_until_expiration / 86400 > 30
          labels:
            severity: warning
        - alert: expiresIn14Days
          annotations:
            description: "The license key for your Pipekit installation will expire in less than 14 days. Please renew the license key to avoid any disruptions. Email hello@pipekit.io for more information."
            summary: The Pipekit license key will expire in less than 14 days.
          expr: |-
            users_license_seconds_until_expiration / 86400 > 14
          labels:
            severity: critical
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pipekit.io/self-hosting-pipekit/license-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
