Skip to content

Commit

Permalink
Add nginx error log which is installed from RHSCL (#3616)
Browse files Browse the repository at this point in the history
Signed-off-by: Huanhuan Li <[email protected]>
(cherry picked from commit 5c84dc2)
  • Loading branch information
huali027 authored and xiangce committed Nov 30, 2022
1 parent 27c8bcc commit 41eeef9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions insights/specs/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from insights.core.context import HostContext
from insights.core.spec_factory import RawFileProvider
from insights.core.spec_factory import simple_file, simple_command, glob_file
from insights.core.spec_factory import simple_file, simple_command, glob_file, head
from insights.core.spec_factory import first_of, command_with_args
from insights.core.spec_factory import foreach_collect, foreach_execute
from insights.core.spec_factory import container_collect, container_execute
Expand Down Expand Up @@ -412,7 +412,13 @@ class DefaultSpecs(Specs):
"/opt/rh/nginx*/root/etc/nginx/*.conf", "/opt/rh/nginx*/root/etc/nginx/conf.d/*.conf", "/opt/rh/nginx*/root/etc/nginx/default.d/*.conf",
"/etc/opt/rh/rh-nginx*/nginx/*.conf", "/etc/opt/rh/rh-nginx*/nginx/conf.d/*.conf", "/etc/opt/rh/rh-nginx*/nginx/default.d/*.conf"
])
nginx_error_log = simple_file("/var/log/nginx/error.log")

nginx_error_log = first_of(
[
simple_file("/var/log/nginx/error.log"),
head(glob_file("/var/opt/rh/rh-nginx*/log/nginx/error.log")),
]
)
nginx_ssl_cert_enddate = foreach_execute(ssl_certificate.nginx_ssl_certificate_files, "/usr/bin/openssl x509 -in %s -enddate -noout")
nmcli_conn_show = simple_command("/usr/bin/nmcli conn show")
nmcli_dev_show = simple_command("/usr/bin/nmcli dev show")
Expand Down

0 comments on commit 41eeef9

Please sign in to comment.