-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61957c1
commit 5ea828a
Showing
6 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
apache_server_limit: 8 | ||
apache_threads_per_child: 32 | ||
ondemand_exporter_version: 0.10.0 | ||
ondemand_exporter_checksum: e56b0c14e2829141f94f44f35ca8577e7623305d83d7c082fb66bba945e0f321 |
18 changes: 18 additions & 0 deletions
18
roles/openondemand-webnode-config/files/ondemand_exporter.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=OnDemand Prometheus Exporter | ||
Wants=basic.target | ||
After=basic.target network.target | ||
|
||
[Service] | ||
User=ondemand_exporter | ||
Group=ondemand_exporter | ||
SyslogIdentifier=ondemand_exporter | ||
Environment="LISTEN_ADDRESS=:9301" | ||
Environment="APACHE_STATUS_URL=http://localhost:81/server-status" | ||
ExecStart=/usr/local/bin/ondemand_exporter | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
KillMode=process | ||
Restart=always | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
22 changes: 22 additions & 0 deletions
22
roles/openondemand-webnode-config/files/ondemand_exporter_apache.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ExtendedStatus On | ||
|
||
Listen 81 | ||
<VirtualHost *:81> | ||
ServerName localhost | ||
|
||
<Location /server-status> | ||
SetHandler server-status | ||
Require ip 127.0.0.1 ::1 | ||
</Location> | ||
|
||
<Location "/"> | ||
<RequireAny> | ||
Require ip 127.0.0.1 ::1 | ||
</RequireAny> | ||
</Location> | ||
|
||
## Logging | ||
ErrorLog logs/ondemand_exporter_error.log | ||
ServerSignature Off | ||
CustomLog logs/ondemand_exporter_access.log combined | ||
</VirtualHost> |
4 changes: 4 additions & 0 deletions
4
roles/openondemand-webnode-config/files/ondemand_exporter_sudo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Defaults:ondemand_exporter !syslog | ||
Defaults:ondemand_exporter !requiretty | ||
ondemand_exporter ALL=(ALL) NOPASSWD:/opt/ood/nginx_stage/sbin/nginx_stage nginx_list | ||
ondemand_exporter ALL=(ALL) NOPASSWD:/usr/sbin/ondemand-passenger-status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Restart httpd | ||
systemd: | ||
name: apache2 | ||
state: restarted | ||
|
||
- name: Reload systemd | ||
systemd: | ||
daemon_reload: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters