...
- With an agent on a system that has been added to upUptime Infrastructure Monitor. time. In this case, the hostname is in the up.time DataStore.
- With an agent that has been deployed on a system that has not been added to up.timeUptime Infrastructure Monitor. If there is no agent on the system, or there are network problems, agentcmd returns the following error message:
ERR Unable to contact Agent (10.1.2.34 on port 9998)
...
Code Block | ||
---|---|---|
| ||
agentcmd <t#> <-/+s> <-p #> hostname command |
Where:
t#
= use timeout.-s
= do not use an SSL connection to the agent (default).+s
= connect to the agent using SSL.If SSL is not enabled on the host, the following error message appears:
ERR The host was not configured to use SSL
-p #
= connect to the agent on the specified port (default is 9998).hostname
= the name or IP address of the host on which the agent is running.command
= the agent command to run.
...
- Contact an agent system.
- Attempt to run a predefined agent-side script.
- Return the results of an agent-side script.
- Validate the status of those results.
- Return the status to upUptime Infrastructure Monitor.time.
The following example illustrates how to run agentcmd in an agent side script:
...
If you use netcat in your scripts, see the following Knowledge Base articles for information on replacing netcat with agentcmd: