mirror of
https://github.com/Cacti/documentation.git
synced 2026-12-06 15:13:53 +09:00
113 lines
6.1 KiB
Markdown
113 lines
6.1 KiB
Markdown
# Device Management
|
|
|
|
A device tells Cacti where to collect measurements and which data collector
|
|
should collect them. Adding a device gives you a place to configure polling.
|
|
Choose the measurements to graph after you save it.
|
|
|
|
## Add a device in the console
|
|
|
|
1. Open **Console > Management > Devices** and select **Add** (+).
|
|
2. Enter a **Description** that operators will recognize in lists and graph
|
|
titles. In **Hostname**, enter a DNS name that the collector can resolve
|
|
or an IP address. Enclose an IPv6 address in brackets, as in
|
|
`[2001:db8::15]`.
|
|
3. Under **Poller Association**, choose the collector that can reach the device.
|
|
Select a **Device Template** that supplies the graph templates and data
|
|
queries you need. For an interface graph, the device's SNMP agent must expose
|
|
the interface counters used by the query. Check the available templates
|
|
and their requirements in [Device Templates](Device-Templates.md).
|
|
4. Choose the **Downed Device Detection** method and configure the credentials
|
|
required by your data inputs. To stage the device before polling begins,
|
|
select **Disable Device**. Save the device.
|
|
|
|

|
|
|
|
**Device Site Association** groups devices by site. **Location** records a more
|
|
specific place, such as a rack. Use **External ID** to associate the device
|
|
with an inventory record and **Notes** for local context. Installed plugins
|
|
can add fields such as notification settings. Configure those fields according
|
|
to the plugin that owns them.
|
|
|
|
## Choose an availability check
|
|
|
|
A failed availability check can stop the poller from collecting otherwise
|
|
reachable measurements. Choose a test that the assigned collector can perform
|
|
and that the device is configured to answer.
|
|
|
|
| Downed Device Detection | When to use it |
|
|
| --- | --- |
|
|
| None | Skip the availability probe. Useful for a local script or another input that has no device to probe. |
|
|
| Ping | Determine reachability with the selected ICMP, TCP or UDP method. Set the destination port for a port-based check. **TCP Ping Closed** also accepts a connection refusal as evidence that the host answered. |
|
|
| SNMP Uptime | Check whether the device answers an uptime query. The PHP poller tries `sysUpTime.0` and falls back to `snmpEngineTime.0`. |
|
|
| Ping and SNMP Uptime | Require both checks to succeed. Use this when the collector can reach both services. |
|
|
| Ping or SNMP Uptime | Accept a successful response from either check. Use this when one protocol may be filtered. |
|
|
| SNMP Desc | Query `sysDescr.0` on a device that exposes its description. |
|
|
| SNMP getNext | The PHP poller requests the next accessible OID after `sysUpTime.0` (`.1.3.6.1.2.1.1.3.0`). If that fails, it tries after `snmpEngineTime.0` (`.1.3.6.1.6.3.10.2.1.3.0`). Reproduce the check with the same SNMP view and starting OIDs. |
|
|
|
|
## Configure collection
|
|
|
|
For a script-only device, select **Not In Use** for **SNMP Version** and choose
|
|
an availability method the script host supports. For an SNMP query or an SNMP
|
|
availability check, match the version and credentials to the agent.
|
|
|
|
| SNMP version | Collector settings |
|
|
| --- | --- |
|
|
| Version 1 | Supply the read community. Use this for agents that require v1. Interface monitoring is limited to 32-bit counters. |
|
|
| Version 2c | Supply the read community. Use 64-bit interface counters when the device exposes them. The community travels in clear text. |
|
|
| Version 3 | Supply the username. For authenticated requests, match the authentication protocol and passphrase. For encrypted requests, also match the privacy protocol and passphrase. Set the context when the agent requires one. Available algorithms depend on the SNMP software on the collector. |
|
|
|
|
**Maximum OIDs Per Get Request** controls how many values the collector asks
|
|
for together. If individual requests succeed but larger requests time out,
|
|
reduce the batch size and repeat the check from the assigned collector.
|
|
Response size, device limits and the network path all matter.
|
|
|
|
**Number of Collection Threads** applies to the Spine poller. For a slow
|
|
device with many measurements, compare polling time and timeout counts before
|
|
and after increasing this value. A device that limits concurrent requests
|
|
can take longer to poll.
|
|
|
|
## Add a device from the command line
|
|
|
|
Run the following commands from the Cacti application directory with the PHP
|
|
runtime and account used for polling. List the templates to find their IDs.
|
|
|
|
```sh
|
|
php cli/add_device.php --list-host-templates
|
|
```
|
|
|
|
This example creates a disabled device for later configuration. Template
|
|
`0` selects no template, version `0` disables SNMP, and `--avail=none`
|
|
skips availability checks. Replace the description and address with an unused
|
|
pair in your installation. The CLI can update an existing record when either
|
|
value matches.
|
|
|
|
```sh
|
|
php cli/add_device.php --description="Lab edge switch" --ip=192.0.2.15 \
|
|
--template=0 --version=0 --avail=none --disable=1
|
|
```
|
|
|
|
Open the new device in **Console > Management > Devices**. Confirm its
|
|
collector. Set the intended template, credentials and availability method,
|
|
then clear **Disable Device** and save. For rule-based onboarding, see
|
|
[Automation Networks](Automation-Networks.md).
|
|
|
|
## Verify collection and create graphs
|
|
|
|
1. Reopen the device. If it uses SNMP, check the returned device information.
|
|
If the check fails, verify the collector, address, port, credentials and
|
|
the OIDs the agent permits that account to read.
|
|
2. Review **Associated Data Queries**. For an interface graph, confirm that
|
|
the query returns the intended interfaces. Run the verbose query if the
|
|
rows are missing. See [Data Queries](Data-Queries.md).
|
|
3. Select **Create Graphs for this Device**, choose the template or query rows
|
|
and create the graphs. Allow enough poll cycles for the first valid
|
|
measurement. A counter rate requires two readings.
|
|
4. Open the graph under **Console > Management > Graphs**. If it stays blank,
|
|
check the data source's last update and the collector log. See
|
|
[Data Source Debugging](Data-Debug.md) and
|
|
[How to Graph Your Network](How-to-Graph-Your-Network.md).
|
|
|
|
---
|
|
|
|
Copyright (c) 2004-2026 The Cacti Group
|