<commit_before>serverdensity-agent
====================

Puppet Module for deploying the Server Density Agent

### Platforms

* Ubuntu
* CentOS

## Usage

### v2 API Config

*If your account URL ends in .io you are using v2*

This will create a new device, and then use the agent key provided automatically by the API to configure the agent on the node.

Create an API token by logging into your Server Density account, clicking your name top left, clicking Preferences then going to the Security tab.

```puppet
class {

        'serverdensity':
            sd_url => 'https://example.serverdensity.io',
            api_token => '<PASSWORD>',
}
```
### v1 API Config

*If your account URL ends in .com you are using v1*

You can use the Server Density API to create a new device, based on the hostname of the node.

```puppet
class {
        'serverdensity':
            sd_url => 'https://example.serverdensity.com',
            api_username => 'username',
            api_password => 'password',
    }

```

### Fixed key config

This will install the agent, with the basic configuration, using the key that is provided.

```puppet
class {
        'serverdensity':
            sd_url => 'https://example.serverdensity.com',
            agent_key => '<KEY>',
    }
```

### Optional Parameters

There are some optional parameters that can be used to configure other parts of the agent

* `$use_fqdn` - This will cause the class to use the facter Fully Qualified Domain Name rather than the detected hostname. Useful in times where the sd-agent and puppet disagree on what the hostname should be.
* `$server_name`
* `$server_group` - Sets the group for the server that is added<commit_msg>Update readme for new class name<commit_after>serverdensity-agent
====================

Puppet Module for deploying the Server Density Agent

### Platforms

* Ubuntu
* CentOS

## Usage

### v2 API Config

*If your account URL ends in .io you are using v2*

This will create a new device, and then use the agent key provided automatically by the API to configure the agent on the node.

Create an API token by logging into your Server Density account, clicking your name top left, clicking Preferences then going to the Security tab.

```puppet
class {

        'serverdensity-agent':
            sd_url => 'https://example.serverdensity.io',
            api_token => '<PASSWORD>',
}
```
### v1 API Config

*If your account URL ends in .com you are using v1*

You can use the Server Density API to create a new device, based on the hostname of the node.

```puppet
class {
        'serverdensity-agent':
            sd_url => 'https://example.serverdensity.com',
            api_username => 'username',
            api_password => 'password',
    }

```

### Fixed key config

This will install the agent, with the basic configuration, using the key that is provided.

```puppet
class {
        'serverdensity-agent':
            sd_url => 'https://example.serverdensity.com',
            agent_key => '<KEY>',
    }
```

### Optional Parameters

There are some optional parameters that can be used to configure other parts of the agent

* `$use_fqdn` - This will cause the class to use the facter Fully Qualified Domain Name rather than the detected hostname. Useful in times where the sd-agent and puppet disagree on what the hostname should be.
* `$server_name`
* `$server_group` - Sets the group for the server that is added
{'fraction_non_alphanumeric': 0.09628328943517706, 'fraction_numerical': 0.002341235001463272, 'mean_word_length': 3.214549938347719, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2665319', 'n_tokens_mistral': 945, 'n_tokens_neox': 916, 'n_words': 428}