Hey Guys, so in a few of the places i've worked, we've done migrations from SNMP v1 -> 2 -> 3, and it's hard to tell other then by going into the database and doing a search to find which devices are version 3 compared to that of which devices are version 1 or whatever. Would be nice if you could display the contents of the snmp_version field possibly in the devices tab.
-Dave
Enhancement: Adding SNMP Version to Devices List
Moderators: Developers, Moderators
Re: Enhancement: Adding SNMP Version to Devices List
Though I'm not sure in detail about what you want, how about this?
% mysql -uUSER -pPASS cacti -e 'select id,description,hostname,snmp_version from host;'
% mysql -uUSER -pPASS cacti -e 'select id,description,hostname,snmp_version from host;'
Code: Select all
Example:
+----+-------------+--------------+--------------+
| id | description | hostname | snmp_version |
+----+-------------+--------------+--------------+
| 1 | Localhost | 127.0.0.1 | 2 |
| 4 | Switch-1 | 192.168.10.1 | 2 |
| 5 | Switch-2 | 192.168.10.2 | 2 |
| 6 | Switch-3 | 192.168.10.3 | 2 |
+----+-------------+--------------+--------------+
Re: Enhancement: Adding SNMP Version to Devices List
Ideally, the whole device display will be AJaxified and allow you to select any column you would like to display or hide, we just aren't at that point just yet. We also need to make the table display a bit easier for plugins to hook into, because then you could at least write a plugin to display the column for you too.
Re: Enhancement: Adding SNMP Version to Devices List
Ah, "in the devices tab" means like this?
host.php:
As cigamit mentioned, it is ideal if we could switch columns on/off dynamically.
(I understand that source modification is not good habit for later (official) patching, but creating plugin is not so easy for me..)
host.php:
Code: Select all
function host() {
...
$display_text = array(
"description" => array("Description", "ASC"),
"id" => array("ID", "ASC"),
"nosort1" => array("Graphs", "ASC"),
"nosort2" => array("Data Sources", "ASC"),
"status" => array("Status", "ASC"),
"status_event_count" => array("Event Count", "ASC"),
"hostname" => array("Hostname", "ASC"),
---> "snmp_version" => array("SNMP Version", "ASC"),
---> "snmp_port" => array("SNMP Port", "ASC"),
---> "snmp_timeout" => array("SNMP Timeout", "ASC"),
"cur_time" => array("Current (ms)", "DESC"),
"avg_time" => array("Average (ms)", "DESC"),
"availability" => array("Availability", "ASC"));
...
if (sizeof($hosts) > 0) {
foreach ($hosts as $host) {
...
form_selectable_cell(...
---> form_selectable_cell($host["snmp_version"], $host["id"]);
---> form_selectable_cell($host["snmp_port"], $host["id"]);
---> form_selectable_cell($host["snmp_timeout"], $host["id"]);
form_selectable_cell(round(($host["cur_time"]), 2), $host["id"]);
(I understand that source modification is not good habit for later (official) patching, but creating plugin is not so easy for me..)
Who is online
Users browsing this forum: No registered users and 3 guests