You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Onboarding using a file instructions in the documentation do not work. The user is instructed to run sudo service omsagent restart, but if the OMS agent is not onboarded during installation the omsagent service does not exist.
To reproduce on 64-bit Ubuntu 16.04:
Run sudo ./omsagent-1.2.0-148.universal.x64.sh --install on a machine without the OMS agent installed
Create /etc/omsagent-onboard.conf as per the documentation, by running sudo su omsagent vi /etc/omsagent-onboard.conf
Run sudo service omsagent restart as per the documentation
At step 2, running sudo su omsagent vi /etc/omsagent-onboard.conf results in an error:
$ sudo su omsagent vi /etc/omsagent-onboard.conf
/usr/bin/vi: /usr/bin/vi: cannot execute binary file
Trying variants of the command allows vi to run - e.g. sudo -su omsagent vi /etc/omsagent-onboard.conf (passing the -s and -u flags to sudo) or sudo su omsagent -c 'vi /etc/omsagent-onboard.conf' (passing vi /etc/omsagent-onboard.conf to su as the command to execute as the user) - however neither variant of the command allows the file to be created successfully as the omsagent does not have write permission to the /etc directory.
The instruction "Create the file /etc/omsagent-onboard.conf The file must be readable and writable for the user omsagent. sudo su omsagent vi /etc/omsagent-onboard.conf" probably needs to be split into two steps - first, create the file and make it readable (sudo touch /etc/omsagent-onboard.conf && sudo chown omsagent:omsagent /etc/omsagent-onboard.conf), second, edit the file (sudo -su omsagent vi /etc/omsagent-onboard.conf). Alternatively, perhaps the file should first be created as root (sudo vi /etc/omsagent-onboard.conf) and then made readable/writable by omsagent (sudo chown omsagent:omsagent /etc/omsagent-onboard.conf)
Once /etc/omsagent-onboard.conf is created, at step 3 running sudo service omsagent restart results in an error:
$ sudo service omsagent restart
Failed to restart omsagent.service: Unit omsagent.service not found.
During installation, the following warning is output: "Warning: Agent is not onboarded. omsagent cannot be registered as a service." This seems to indicate that the omsagent service will not exist until the agent is onboarded, so we can't use service omsagent restart to onboard the agent.
It appears from #185 that the correct instruction is cd <somewhere> && sudo ./service_control <something> - perhaps cd /opt/microsoft/omsagent/bin/ && sudo ./service_control restart, or just sudo /opt/microsoft/omsagent/bin/service_control restart
The text was updated successfully, but these errors were encountered:
I can't actually get any of the command variants from #185 to work to onboard the agent. All of the service_control options just result in "Warning: Agent is not onboarded. omsagent cannot be registered as a service."
@nhinds Thank you! The document is out of date. We'll update it.
Basically, it should not call service omsagent start, but sudo /opt/microsoft/omsagent/bin/omsadmin.sh
The Onboarding using a file instructions in the documentation do not work. The user is instructed to run
sudo service omsagent restart
, but if the OMS agent is not onboarded during installation theomsagent
service does not exist.To reproduce on 64-bit Ubuntu 16.04:
sudo ./omsagent-1.2.0-148.universal.x64.sh --install
on a machine without the OMS agent installed/etc/omsagent-onboard.conf
as per the documentation, by runningsudo su omsagent vi /etc/omsagent-onboard.conf
sudo service omsagent restart
as per the documentationAt step 2, running
sudo su omsagent vi /etc/omsagent-onboard.conf
results in an error:Trying variants of the command allows
vi
to run - e.g.sudo -su omsagent vi /etc/omsagent-onboard.conf
(passing the-s
and-u
flags tosudo
) orsudo su omsagent -c 'vi /etc/omsagent-onboard.conf'
(passingvi /etc/omsagent-onboard.conf
tosu
as the command to execute as the user) - however neither variant of the command allows the file to be created successfully as theomsagent
does not have write permission to the/etc
directory.The instruction "Create the file
/etc/omsagent-onboard.conf
The file must be readable and writable for the user omsagent.sudo su omsagent vi /etc/omsagent-onboard.conf
" probably needs to be split into two steps - first, create the file and make it readable (sudo touch /etc/omsagent-onboard.conf && sudo chown omsagent:omsagent /etc/omsagent-onboard.conf
), second, edit the file (sudo -su omsagent vi /etc/omsagent-onboard.conf
). Alternatively, perhaps the file should first be created as root (sudo vi /etc/omsagent-onboard.conf
) and then made readable/writable byomsagent
(sudo chown omsagent:omsagent /etc/omsagent-onboard.conf
)Once
/etc/omsagent-onboard.conf
is created, at step 3 runningsudo service omsagent restart
results in an error:During installation, the following warning is output: "Warning: Agent is not onboarded. omsagent cannot be registered as a service." This seems to indicate that the
omsagent
service will not exist until the agent is onboarded, so we can't useservice omsagent restart
to onboard the agent.It appears from #185 that the correct instruction is
cd <somewhere> && sudo ./service_control <something>
- perhapscd /opt/microsoft/omsagent/bin/ && sudo ./service_control restart
, or justsudo /opt/microsoft/omsagent/bin/service_control restart
The text was updated successfully, but these errors were encountered: