This is a RHEL7 machine and is puppet managed:
https://git.psi.ch/linux-infra/data-pli/blob/master/default/influx00.psi.ch.yaml

Runs the influxdb backend for the metrics.psi.ch service, as part of the telegraph, influxdb and grafana stack.

Influx version installed:
```
[root@influx00 ~]# rpm -qf /usr/bin/influxd
influxdb-1.8.3-1.x86_64
```

Open ports on this server are:
```
[root@influx00 influxdb]# ss -tln
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port
LISTEN     0      128          *:22                       *:*
LISTEN     0      128    127.0.0.1:8088                     *:*
LISTEN     0      100    127.0.0.1:25                       *:*
LISTEN     0      5            *:5666                     *:*
LISTEN     0      128          *:111                      *:*
LISTEN     0      128       [::]:8086                  [::]:*
LISTEN     0      128       [::]:22                    [::]:*
LISTEN     0      100      [::1]:25                    [::]:*
LISTEN     0      5         [::]:5666                  [::]:*
LISTEN     0      128       [::]:111                   [::]:*
```

There is no firewall running on this machine.

Note: Do not update to influxdbd 2.x. The new version requires authentication by the clients, which is not implemented in puppet / telegraph.


Data is stored at `/var/lib/influxdb` "locally" on the virtual machine.
The influx configuration can be found `/etc/influxdb/influxdb.conf`



# Questions
- Is there a more detailed documenation/script/playbook that descibes the setup of this server?

  - Beyond the hiera config, the machine is set to use the influxdb role, which in turn applies the influxdb profile: https://git.psi.ch/linux-infra/puppet/blob/preprod/code/modules/profile/manifests/influxdb.pp

- How was the influxdb package installed on that machine?

  - From the profile and now it is locked via the versionlock yum plugin.

- The storage for the data is "locally" to the virtual machine?

  - Yes, all the data is stored on the VM disk image.

- The configuration file `/etc/influxdb/influxdb.conf` does report that its managed via puppet. However I don't see anything in the puppet configuration https://git.psi.ch/linux-infra/data-pli/blob/master/default/influx00.psi.ch.yaml. Where does this file come from?
```
########################################################################
#
# THIS FILE IS MANAGED BY PUPPET - DO NOT MODIFY!
#
########################################################################
```
Is it this one: https://git.psi.ch/linux-infra/puppet/blob/preprod/code/modules/profile/manifests/influxdb.pp ? Through what config does this get applied to the server?

  - Correct
```
[klart@klart ~]$ bob node list -v influx00.psi.ch
influx00.psi.ch  pli  local  ipxe_installer=rhel73server  network=static  puppet_env=pmons  puppet_role=role::influxdb
```

- The influx service seems to be started by systemd, however it seems that the systemd service file does not come with a package - was this one placed manually there?
```
[root@influx00 ~]# rpm -qf /usr/lib/systemd/system/influxdb.service
file /usr/lib/systemd/system/influxdb.service is not owned by any package
[root@influx00 ~]# cat /usr/lib/systemd/system/influxdb.service
# If you modify this, please also make sure to edit init.sh

[Unit]
Description=InfluxDB is an open-source, distributed, time series database
Documentation=https://docs.influxdata.com/influxdb/
After=network-online.target

[Service]
User=influxdb
Group=influxdb
LimitNOFILE=65536
EnvironmentFile=-/etc/default/influxdb
ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf $INFLUXD_OPTS
KillMode=control-group
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=influxd.service
[root@influx00 ~]#
```

- Answer:

  - It is installed by the rpm, but from the install script of the rpm, not as a file.

- What are the other open ports needed for? :111 :8086 :25 :8088

  - 25 is postfix (SMTP), 111 belongs to NFS, the 80xx ports both belong to influx
  - It's certainly not being used, nothing is mounted or exported via NFS. It isn't even enabled in puppet for this host. However, most of the puppet works in a way, where it installs things, but doesn't remove anything, if the settings change. So if it was enabled at any time in the past, it was just left behind. Though the NFS service is not running, only the rpcbind is.