Skip to content

Commit

Permalink
Don't register loggregator agent when not enabled
Browse files Browse the repository at this point in the history
Don't register loggregator agent with forwarder agent or prom scraper
when the loggregator agent is not enabled.
  • Loading branch information
acrmp committed Jan 9, 2024
1 parent 1999e86 commit 12b08e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jobs/loggregator_agent/templates/pre-start.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if_link("doppler") do |d|
end
%>

<% unless has_doppler %>
<% if ! p('enabled') || ! has_doppler %>
rm /var/vcap/jobs/loggregator_agent/config/ingress_port.yml
rm /var/vcap/jobs/loggregator_agent/config/prom_scraper_config.yml
<% end %>
4 changes: 2 additions & 2 deletions jobs/loggregator_agent_windows/templates/pre-start.ps1.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ end
New-Item -Path /var/vcap/sys/run/loggregator_agent_windows -ItemType directory -Force
New-Item -Path /var/vcap/sys/log/loggregator_agent_windows -ItemType directory -Force

<%unless has_doppler%>
<% if ! p('enabled') || ! has_doppler %>
Remove-Item -Path /var/vcap/jobs/loggregator_agent_windows/config/ingress_port.yml
Remove-Item -Path /var/vcap/jobs/loggregator_agent_windows/config/prom_scraper_config.yml
<%end%>
<% end %>

0 comments on commit 12b08e5

Please sign in to comment.