update the FQDN when doing the doing the monitoring configuration
- [x] I am okay with my commits getting squashed when you merge this PR.
- [ ] I am familiar with the contributing guidelines.
Please cherry-pick my commits into:
- [ ] Foreman 3.11/Katello 4.13
- [ ] Foreman 3.10/Katello 4.12
- [ ] Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8/6.9)
- [ ] Foreman 3.8/Katello 4.10
- [ ] Foreman 3.7/Katello 4.9 (Satellite 6.14)
- [ ] Foreman 3.6/Katello 4.8
- [ ] Foreman 3.5/Katello 4.7 (Satellite 6.13; orcharhino 6.6/6.7)
- We do not accept PRs for Foreman older than 3.5.
The PR preview for 16fb01968c11afcdde388b67d0b0677f20849fa9 is available at theforeman-foreman-documentation-preview-pr-3187.surge.sh
The following output files are affected by this PR:
- Administering_Project/index-satellite.html
- Configuring_Load_Balancer/index-satellite.html
- Installing_Proxy/index-satellite.html
- Installing_Server/index-satellite.html
- Installing_Server_Disconnected/index-satellite.html
- Managing_Configurations_Ansible/index-satellite.html
- Managing_Configurations_Puppet/index-satellite.html
- Managing_Content/index-satellite.html
- Managing_Hosts/index-satellite.html
- Managing_Security_Compliance/index-satellite.html
- Monitoring_Project/index-satellite.html
- Provisioning_Hosts/index-satellite.html
- Tuning_Performance/index-satellite.html
- Updating_Project/index-satellite.html
Problem Statement
Here is the link
https://docs.redhat.com/en/documentation/red_hat_satellite/6.15/html-single/monitoring_satellite_performance/index#configuring-pcp-data-collection_monitoring
and here is the recommendation
cd /var/lib/pcp/pmdas/openmetrics
echo "https://satellite.example.com/metrics" > config.d/foreman.url
./Install
Instead, it could be something like
cd /var/lib/pcp/pmdas/openmetrics
echo "https://$(hostname -f)/metrics" > config.d/foreman.url
./Install
The reason is because, in general, the customer will copy/paste the command and will move on, as consequence, the implementation will fail, once the FQDN is different.
I don't think this is a good idea, especially for API requests, because those can be run from other machines than the Foreman server.
from Triage:
Hi @Imaanpreet
changing the value of the attribute has huge implications on the whole docs, so this is not something that is feasible in this PR. However, you can temporarily "overwrite" this attribute in specific lines and/or modules:
diff --git a/guides/doc-Monitoring_Project/master.adoc b/guides/doc-Monitoring_Project/master.adoc
index 1236c376c7..d1289b0ca2 100644
--- a/guides/doc-Monitoring_Project/master.adoc
+++ b/guides/doc-Monitoring_Project/master.adoc
@@ -16,8 +16,14 @@ include::common/modules/con_setting-up-the-metrics-monitoring-solution.adoc[leve
include::common/modules/proc_installing-pcp.adoc[leveloffset=+2]
+:parent-foreman-example-com: {foreman-example-com}
+:foreman-example-com: $(hostname -f)
+
include::common/modules/proc_configuring-pcp-data-collection.adoc[leveloffset=+2]
+:foreman-example-com: {parent-foreman-example-com}
+:!parent-foreman-example-com: {foreman-example-com}
+
include::common/modules/proc_verifying-pcp-configuration.adoc[leveloffset=+2]
ifndef::foreman-deb[]
This results in the following rendered docs:
I'd even suggest that if you really want to do this (and that's a big if) then we should modify the procedure to avoid the attribute.
I've suggested on Slack that instead of changing the value, we might add a sentence after the URL example to tell the user that they are supposed to replace the value with their own hostname. The command will not provide the correct value if they run it on another machine than the Foreman server.
So I agree with Ewoud that we should avoid changing the attribute.
Hello @ekohl , @Lennonka & @maximiliankolb : thank you for looking in to the issue.
Sorry for the typo (for not adding $ while creating the PR) @ekohl.
Before creating the PR , I knew this we need to come to an agreement what to do with this request. So the goal of this PR is to avoid the failure and we can do this by adding an another line as @Lennonka mentioned. I can totally agree with @ekohl avoid changing the attribute.
docs triage: Closing this PR. We cannot make this change as proposed: Docs and esp. attribute usage are consistent: we always have "foreman.example.com" as single FQDN for your Foreman instance.
Regarding HA/load balancing: please see https://github.com/theforeman/foreman-documentation/pull/3187#pullrequestreview-2220814483
@Imaanpreet If you have further concerns, please reopen the PR or ping us on Matrix.
Hello @maximiliankolb : can we just add a line by replace the satellite/foreman hostname with FQDN for example -
"Be aware that you will need to replace the value of {foreman-example-com} with the FQDN of your server"
This way we keep the hardcoded value and we don't need to change it. What are your thoughts about it?
@Imaanpreet Maybe after line 63 similar to
# guides/common/modules/snip_replace-fqdn-projectserver.adoc
1:Replace _{foreman-example-com}_ with the FQDN of your {ProjectServer}.
@Imaanpreet Maybe after line 63 similar to
# guides/common/modules/snip_replace-fqdn-projectserver.adoc 1:Replace _{foreman-example-com}_ with the FQDN of your {ProjectServer}.
looks perfect.
@maximiliankolb, Hello ! Have you updated the change? can I update and give you the new PR ?