Git Product home page Git Product logo

plugin_monitor's Introduction

Cacti ™

Cacti Commit Audit Project Status Translation Status Average time to resolve an issue Percentage of open issues


Welcome to the Cacti GitHub Site!

Introduction

We currently have two functioning versions of Cacti on this site, and several Cacti plugins supported by The Cacti Group. Our current long lived version of Cacti in the 1.2.x branch. The current release version of this branch is Cacti 1.2.27.

This pending maintenance release has several bugs fixes, and significantly more welcomed feature enhancements. You can review the CHANGELOG for the 1.2.x branch for more information on that.

Additionally, we have the develop branch. This is now an active Development Branch. In this branch, we as a team have re-grouped and are introducing several new features. We hope to be able to deliver a Christmas present for Cacti enthusiasts, which will be a Cacti 1.3.0-beta release. If you want to get involved earlier, you can simply download the development release and knock yourselves out. The 1.3.0 release will include everything in th 1.2.27 release, as well as several additional features from our roadmap.

System requirements vary from Cacti point release to point release. The matrix below documents the minimum tool levels for each version. With our source distribution, all the vendor included packages are pre-packeged and tested by the Cacti group, so there is no reason to use package management tools to install those dependencies.

Dependency Cacti 1.2.x Cacti 1.3.x
MariaDB 5.5+ 10.2.x+
MySQL 5.5+ 5.7+
PHP 5.4+ 8.0+
RRDtool 1.4+ 1.8+
Net-SNMP 5.5+ 5.8+

For Cacti 1.2.x, it is reasonable to run with RHEL/CentOS 7 or equivalent. However, for Cacti 1.3.x, it would be better to run on RHEL/CentOS/Rocky 8 or equivalent as this OS version makes PHP8.0 available via a DNF Stream.

However, if you wish to run Cacti 1.3.x on the RHEL/CentOS 7 distribution you can do so if you use the REMI distributions of PHP. You will also in this case have to build RRDtool 1.8+ from source, which is straightforward.

In the sections below, you can find some important first steps before installing either the Cacti 1.2.x version of the pending Cacti 1.3.x version. Good luck and enjoy Cacti.

Most modern browsers are supported with the exception of ALL Internet Explorer versions as of Cacti version 1.2.x. Do NOT attempt to use Internet Explorer of any version with Cacti 1.2.x and above.

Running Cacti from the develop Branch

IMPORTANT

When using source or by downloading the code directly from the repository, it is important to note that periodically, you may have to rerun the database upgrade cli script to bring in new columns. You can use the --forcever=1.2.22 option to assume you are upgrading from an earlier cacti version:

php -q upgrade_database.php --forcever=1.2.22

If you experience SQL errors in your Cacti log, please open a case in our Cacti issue tracker here.

Upgrading from Pre-Cacti 1.x Releases

When Cacti was first developed nearly 20 years ago, MySQL was not as mature as it is now. When The Cacti Group went about engineering Cacti 1.x, a decision was made to force users to use the InnoDB storage engine for many of the Tables. This was done as the InnoDB storage engine provides a better user experience when your web site has several concurrent logins. Though a little slower, it also provides greater resiliency for the developers.

With that said, there are several changes that you MUST perform to MySQL/MariaDB before you upgrade, and a service restart is required. Depending on your release of MariaDB or MySQL, the following settings will either be required, or already enabled as default:

[mysqld]

# required for multiple language support
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

# Memory tunables - Cacti provides recommendations at upgrade time
max_heap_table_size = XXX
max_allowed_packet = 500M
tmp_table_size = XXX
join_buffer_size = XXX
sort_buffer_size = XXX

# important for compatibility
sql_mode=NO_ENGINE_SUBSTITUTION

# innodb settings - Cacti provides recommendations at upgrade time
innodb_buffer_pool_instances = XXX
innodb_flush_log_at_trx_commit = 2
innodb_buffer_pool_size = XXX
innodb_sort_buffer_size = XXX
innodb_doublewrite = ON

# required
innodb_file_per_table = ON
innodb_file_format = Barracuda
innodb_large_prefix = 1

# not all version support
innodb_flush_log_at_timeout = 3

# for SSD's/NVMe
innodb_read_io_threads = 32
innodb_write_io_threads = 16
innodb_io_capacity = 10000
innodb_io_capacity_max = 20000
innodb_flush_method = O_DIRECT

The required settings are very important. Otherwise, you will encounter issues upgrading. The settings with XXX, Cacti will provide a recommendation at upgrade time. It is not out of the ordinary to have to restart MySQL/MariaDB during the upgrade to tune these settings. Please make special note of this before you begin your upgrade.

Before you upgrade, you should make these required changes, then restart MySQL/MariaDB. After that, you can save yourself some time and potential errors by running the following scripts (assuming you are using bash):

for table in `mysql -e "SELECT TABLE_NAME FROM information_schema.TABLES WHERE table_schema='cacti' AND engine!='MEMORY'" cacti | grep -v TABLE_NAME`;
do
   echo "Converting $table";
   mysql -e "ALTER TABLE $table ENGINE=InnoDB ROW_FORMAT=Dynamic CHARSET=utf8mb4" cacti;
done

This will convert any tables that are either InnoDB or MyISAM to Barracuda file format, dynamic row format and utf8mb4. Note, that if you have been using MySQL or MariaDB without innodb_file_per_table set to on, you might be better in backing up your database, resetting InnoDB by removing your ib* files in the /var/lib/mysql directory, and after which restoring your database and MySQL/MariaDB tables and permissions. Before you take such a step, you should always practice on a test server until you feel comfortable with the change.

Good luck, and enjoy Cacti!

Running Database Upgrade Script

sudo -u cacti php -q cli/upgrade_database.php --forcever=`cat include/cacti_version`

Updating Cacti Version in Database

update version set cacti = '1.1.38';

Note: Change the above version to the correct version or risk the installer upgrading from a previous version.


About Cacti

Cacti is a complete network graphing solution designed to harness the power of RRDtool's data storage and graphing functionality providing the following features:

  • Remote and local data collectors

  • Device discovery

  • Automation of device and graph creation

  • Graph and device templating

  • Custom data collection methods

  • User, group and domain access controls

All of this is wrapped in an intuitive, easy to use interface that makes sense for both LAN-sized installations and complex networks with thousands of devices.

Developed in the early 2000s by Ian Berry as a high school project, it has been used by thousands of companies and enthusiasts to monitor and manage their Enterprise Networks and Data Centers.

Requirements

Cacti should be able to run on any Linux, UNIX, or Windows based operating system with the following requirements:

  • PHP 7.4+

  • MySQL 5.6+

  • RRDtool 1.3+, 1.5+ recommended

  • NET-SNMP 5.5+

  • Web Server with PHP support

PHP Must also be compiled as a standalone cgi or cli binary. This is required for data gathering via cron.

php-snmp

We mark the php-snmp module as optional. So long as you are not using ipv6 devices, or using snmpv3 engine IDs or contexts, then using php-snmp should be safe. Otherwise, you should consider uninstalling the php-snmp module as it will create problems. We are aware of the problem with php-snmp and looking to get involved in the php project to resolve these issues.

RRDtool

RRDtool is available in multiple versions and a majority of them are supported by Cacti. Please remember to confirm your Cacti settings for the RRDtool version if you having problem rendering graphs.

Documentation

Documentation is available with the Cacti releases and also available for viewing on the Documentation Repository.

Contribute

Check out the main Cacti web site for downloads, change logs, release notes and more!

Community forums

Given the large scope of Cacti, the forums tend to generate a respectable amount of traffic. Doing your part in answering basic questions goes a long way since we cannot be everywhere at once. Contribute to the Cacti community by participating on the Cacti Community Forums.

GitHub Documentation

Get involved in creating and editing Cacti Documentation! Fork, change and submit a pull request to help improve the documentation on GitHub.

GitHub Development

Get involved in development of Cacti! Join the developers and community on GitHub!


Functionality

Data Sources

Cacti handles the gathering of data through the concept of data sources. Data sources utilize input methods to gather data from devices, hosts, databases, scripts, etc... The possibilities are endless as to the nature of the data you are able to collect. Data sources are the direct link to the underlying RRD files; how data is stored within RRD files and how data is retrieved from RRD files.

Graphs

Graphs, the heart and soul of Cacti, are created by RRDtool using the defined data sources definition.

Templating

Bringing it all together, Cacti uses and extensive template system that allows for the creation and consumption of portable templates. Graph, data source, and RRA templates allow for the easy creation of graphs and data sources out of the box. Along with the Cacti community support, templates have become the standard way to support graphing any number of devices in use in today computing and networking environments.

Data Collection (The Poller)

Local and remote data collection support with the ability to set collection intervals. Check out Data Source Profile with in Cacti for more information. Data Source Profiles can be applied to graphs at creation time or at the data template level.

Remote data collection has been made easy through replication of resources to remote data collectors. Even when connectivity to the main Cacti installation is lost from remote data collector, it will store collected data until connectivity is restored. Remote data collection only requires MySQL and HTTP/HTTPS access back to the main Cacti installation location.

Network Discovery and Automation

Cacti provides administrators a series of network automation functionality in order to reduce the time and effort it takes to setup and manage devices.

  • Multiple definable network discovery rules

  • Automation templates that specify how devices are configured

Plugin Framework

Cacti is more than a network monitoring system, it is an operations framework that allows the extension and augmentation of Cacti functionality. The Cacti Group continues to maintain an assortment of plugins. If you are looking to add features to Cacti, there is quite a bit of reference material to choose from on GitHub.

Dynamic Graph Viewing Experience

Cacti allows for many runtime augmentations while viewing graphs:

  • Dynamically loaded tree and graph view

  • Searching by string, graph and template types

  • Viewing augmentation

  • Simple time span adjustments

  • Convenient sliding time window buttons

  • Single click realtime graph option

  • Easy graph export to csv

  • RRA view with just a click

User, Groups and Permissions

Support for per user and per group permissions at a per realm (area of Cacti), per graph, per graph tree, per device, etc... The permission model in Cacti is role based access control (RBAC) to allow for flexible assignment of permissions. Support for enforcement of password complexity, password age and changing of expired passwords.

RRDtool Graph Options

Cacti supports most RRDtool graphing abilities including:

Graph Options

  • Full right axis

  • Shift

  • Dash and dash offset

  • Alt y-grid

  • No grid fit

  • Units length

  • Tab width

  • Dynamic labels

  • Rules legend

  • Legend position

Graph Items

  • VDEFs

  • Stacked lines

  • User definable line widths

  • Text alignment


Copyright (c) 2004-2024 - The Cacti Group, Inc.

plugin_monitor's People

Contributors

arthurmatthew avatar cigamit avatar dsclassen avatar gdsotirov avatar jpobeda avatar linegod avatar marcbanyard avatar mss970 avatar netniv avatar nilovigor avatar paineta avatar ronytomen avatar snsupersharp avatar thewitness avatar w1sht0l1v3 avatar weblate avatar xmacan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin_monitor's Issues

Last Fail problem

Hello, i have last version of cacti and plugin_monitor.
Have problem with last fail. All is 0000-00-00 00:00:00

Os: Ubuntu 16.04
Php version 7.0.15-0ubuntu0.16.04.4
Mysql: 5.7.18
Cacti version Version 1.1.7
plugin_monitor 2.1

Feature Request - Containers

Please implement a drillable containers feature. This would allow for grouping devices into containers with a container status for all devices in the container and being able to drill into containers. This would be useful for organizations with multiple graphically separated sites or multiple buildings on a campus to group devices based on location.

Please also add the ability to monitor the status of individual interfaces on routers, switches etc and create links to produce a host topology in the monitoring tab.

Feature Request: Custom Tiles or at least the old ones as an option

Not a fan of the "new" stacked server icons. Would if you could add the old ones from 0.6.2 as an option as well (even if not default) or even better, add some way (or directions in the readme) to add custom icons. If going the latter route would be great if could do on a "device" level or (worse case) tree header or device template level. Would love to be able to quickly and visually differentiate different types of devices.

CSS Layout Overlaps

Hello,
After last pull, I've notice there's something wrong with the layout. It overlaps if selected on TREE

add device with CLI and add monitoring!

Hi,

Can you add a function, that if a new device will be added with CLI (cacti/cli/add_device.php) to add this devices to the monitoring TAB with some special command.

br
Bernhard

Monitor host status

All of my hosts are showing "Alert Ping" and red as status on monitor.php, even though the status in hosts database field are all a value of 3. According to the array $icolorsdisplay in monitor.php, those hosts should be showing "Up". I am running the latest dev commits on both cacti and monitor. What am I doing wrong?

Validation error in Cacti Version: 0.8.8h

I clone plugin_monitor into cacti 0.8.8h plugins path, then in Console -> Plugin Management -> install old plugin message "Validation error." appear. What should I do?

Monitor plugin render host and tree errors in list view

netniV introduced a patch for the issue below, I have tested it and it resolved the errors below.
Can you please be kind enough to patch the github version with below, I do not want to loose track of this fix.

Apply this patch and see if it disappears:

diff --git a/monitor.php b/monitor.php
index d8962c0..452b1b5 100644
--- a/monitor.php
+++ b/monitor.php
@@ -1354,6 +1354,7 @@ function render_footer_list($hosts) {
}

function render_host_list($host) {

  •   global $criticalities;
      if (!is_device_allowed($host['id'])) {
              return ;
      }
    

2018/02/25 22:33:46 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 122 draw_page)(/plugins/monitor/monitor.php: 145 render_tree)(/plugins/monitor/monitor.php: 961 render_host)(/plugins/monitor/monitor.php: 1082 render_host_list)(/plugins/monitor/monitor.php: 1379 CactiErrorHandler)(/lib/functions.php: 4624 cacti_debug_backtrace)

2018/02/25 22:33:46 - ERROR PHP NOTICE in Plugin 'monitor': Undefined variable: criticalities in file: /var/www/html/plugins/monitor/monitor.php on line: 1379
2018/02/25 22:33:46 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 122 draw_page)(/plugins/monitor/monitor.php: 145 render_tree)(/plugins/monitor/monitor.php: 961 render_host)(/plugins/monitor/monitor.php: 1082 render_host_list)(/plugins/monitor/monitor.php: 1379 CactiErrorHandler)(/lib/functions.php: 4624 cacti_debug_backtrace)

Fresh install - PHP Error

Hi there,

I'm just testing Cacti 1.0.0 and plugins to migrate my current installation in the near future.

Plugin installation went well but I see these errors on cacti's log

2017-02-07 11:17:42 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 87 ajax_status)(/plugins/monitor/monitor.php: 1077 CactiErrorHandler)(/lib/functions.php: 4230 cacti_debug_backtrace)
2017-02-07 11:17:42 - ERROR PHP NOTICE in Plugin 'monitor': Undefined index: 0 in file: /var/www/html/cacti-1.0.0/plugins/monitor/monitor.php on line: 1077
2017-02-07 11:17:42 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 87 ajax_status)(/plugins/monitor/monitor.php: 1076 CactiErrorHandler)(/lib/functions.php: 4230 cacti_debug_backtrace)
2017-02-07 11:17:42 - ERROR PHP NOTICE in Plugin 'monitor': Undefined index: 0 in file: /var/www/html/cacti-1.0.0/plugins/monitor/monitor.php on line: 1076
2017-02-07 11:17:39 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 101 draw_page)(/plugins/monitor/monitor.php: 121 render_default)(/plugins/monitor/monitor.php: 641 render_host)(/plugins/monitor/monitor.php: 935 CactiErrorHandler)(/lib/functions.php: 4230 cacti_debug_backtrace)
2017-02-07 11:17:39 - ERROR PHP NOTICE in Plugin 'monitor': Undefined index: 0 in file: /var/www/html/cacti-1.0.0/plugins/monitor/monitor.php on line: 935

Plugin seems to be working just fine.

My current setup is:

Cacti 1.0.0
PHP 5.3.3
Apache 2.2
MariaDB 10.0

Reboot alarms

Can monitor plugin send alarm to email on devices reboot?

Monitor plugin ver. 21 on cacti ver 1.1.7

Monitor Plugin Permissions issues

Created a user with zero permissions, added it to a group with permissions to view some devices but not all, change the view options to tree under the monitor tab and user is able to see only the devices they have permissions for. Change the view option to default and they can see all devices, hover over a device that the user has no permissions for and see all snmp information regarding the device. The user default is to deny on everything and yet they can still see everything using the monitor tab.
Changed for settings for view to default with permissions and same issue occurs.

See the attached for settings:

Permissions set to Deny on all
permissions

Works fine with tree view selected
tree veiw

Can see all devices with Default view selected
default view

Can hover and see all device information
hover

Bug: When all trees selected: only 1 root container is shown see PICs

In Monitor plugin when all trees selected: only 1 root container is shown "Remote Offices" see PIC.
Other root containers are missing.
root-tree

I do have devices associated with other root containers and they are properly shown when individual root container is selected: (In a pic below EDC - Jersey City, NJ root container selected)
root-tree-jc

Available "root containers":
contaners

Please let me know if additional clarifications are needed.

Tree Group View overlapping

Monitor plugin host view = Tree. Medium Size

When group does have more host than one line can carry.
The second group is overlapping it.

cacti

Error sending message

Hi;

I'm get the follow error when device is down and monitor plugin send mail.

11/05/2018 13:25:20 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/poller_monitor.php: 92 monitor_uptime_checker)(/plugins/monitor/poller_monitor.php: 233 process_reboot_email)(/plugins/monitor/poller_monitor.php: 305 process_send_email)(/plugins/monitor/poller_monitor.php: 490 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
11/05/2018 13:25:20 - ERROR PHP NOTICE in Plugin 'monitor': Undefined variable: warn_hosts in file: /opt/cacti/plugins/monitor/poller_monitor.php on line: 490
11/05/2018 13:25:20 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/poller_monitor.php: 92 monitor_uptime_checker)(/plugins/monitor/poller_monitor.php: 233 process_reboot_email)(/plugins/monitor/poller_monitor.php: 305 process_send_email)(/plugins/monitor/poller_monitor.php: 489 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
11/05/2018 13:25:20 - ERROR PHP NOTICE in Plugin 'monitor': Undefined variable: alert_hosts in file: /opt/cacti/plugins/monitor/poller_monitor.php on line: 489

I get the mail without any problems but all time thi message is show in cacti log for all mails configure in notification list.

MAILER Mail Successfully Sent to '[email protected]', Subject: 'Cacti Device Reboot Nofication'

This is what I have in lines 489 and 490

(sizeof($alert_hosts) ? sizeof($alert_hosts) . ' Alert Notifications':'') .
(sizeof($warn_hosts) ? (sizeof($alert_hosts) ? ', and ':'') .

I running cacti Version 1.1.38 on Debian 9

Thanks;

More often host avability checking

I would like to check avability more often than getting datas for graphs.

I would see that as another option on "devices".
Check avability by 15/30/60/120/180....sec.

Maybe there should be another daemon for checking avability?

After latest pull request 50 Plugin monitor gets disabled with Call to undefined function

2018/02/24 16:33:08 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'monitor'

2018/02/24 16:33:08 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4446 cacti_debug_backtrace)
2018/02/24 16:33:08 - ERROR PHP ERROR in Plugin 'monitor': Call to undefined function get_md5_include_css() in file: /var/www/html/plugins/monitor/monitor.php on line: 136

Changing senders email

Currently device reboot notification is sent as the cacti configured sender. Is there any way to sent device reboot notification as different sender?

Monitor php warning

2016-11-18 12:57:46 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 85 ajax_status)(/plugins/monitor/monitor.php: 1080 CactiErrorHandler)(/lib/functions.php: 4165 cacti_debug_backtrace)
2016-11-18 12:57:46 - ERROR PHP NOTICE in Plugin 'monitor': Undefined offset: 0 in file: /var/www/html/cacti/plugins/monitor/monitor.php on line: 1080

??

I've latest plugin version of cacti and monitor plugin.

PHP ERRORS "Undefined variable" after host went down

Hi there,

First time I've seen it but don't know for how long it's been happening. Don't know if it's really a thold or monitor thing. btw, I actually got the downed notification email

I'm running
Cacti 1.1.37
Monitor 2.3.4
THold 1.0.5

After a device went down

> 17/Jul/2018 09:53:44 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/poller_monitor.php: 92 monitor_uptime_checker)(/plugins/monitor/poller_monitor.php: 233 process_reboot_email)(/plugins/monitor/poller_monitor.php: 305 process_send_email)(/plugins/monitor/poller_monitor.php: 490 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
> --
> 17/Jul/2018 09:53:44 - ERROR PHP NOTICE in Plugin 'monitor': Undefined variable: warn_hosts in file: /usr/share/cacti-1.1.37/plugins/monitor/poller_monitor.php on line: 490
> 17/Jul/2018 09:53:44 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/poller_monitor.php: 92 monitor_uptime_checker)(/plugins/monitor/poller_monitor.php: 233 process_reboot_email)(/plugins/monitor/poller_monitor.php: 305 process_send_email)(/plugins/monitor/poller_monitor.php: 489 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
> 17/Jul/2018 09:53:44 - ERROR PHP NOTICE in Plugin 'monitor': Undefined variable: alert_hosts in file: /usr/share/cacti-1.1.37/plugins/monitor/poller_monitor.php on line: 489

The devices that went down has these settings

image

Monitor Plugin Integratio with Thold Alarms not functioning.

Upon testing Monitor Plugin Integration with Thold, I have discovered that Monitored Object doesn't change color if THOLD alarm associated with that object are in triggered state:
Monitor Plugin Object:
dallas
Expected Triggered Color:
triggered
Thold Triggered Alarm associated with the object:
triggered-thold

plugin installation

hi,

today i want to install this plugin in the newest cacti git revision.
i cannot "install" this plugin because of following error message (i click on the install plugin icon in the plugin category).

Validation error for variable id, with value of "plugin_monitor". See backtrace below for more details.
(/plugins.php: 51 get_filter_request_var)(/lib/html_utility.php: 430 die_html_input_error)(/lib/html_validate.php: 60 cacti_debug_backtrace)

and, only the "git clone" of this plugin in the plugin directory creates now following persistent error-messages on each poller run:

2017-01-03 22:11:03 - SYSTEM STATS: Time:2.2054 Method:spine Processes:1 Threads:5 Hosts:40 HostsPerProcess:40 DataSources:201 RRDsProcessed:131
2017-01-03 22:11:04 - ERROR PHP WARNING in Plugin 'plugin_monitor': parse_ini_file(/usr/share/cacti/plugins/monitor/INFO): failed to open stream: No such file or directory in file: /usr/share/cacti/plugins/plugin_monitor/setup.php on line: 110
2017-01-03 22:11:04 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php: 704 snmpagent_poller_bottom)(/lib/snmpagent.php: 329 snmpagent_get_pluginslist)(/lib/snmpagent.php: 392 plugin_monitor_version)(/plugins/plugin_monitor/setup.php: 110 parse_ini_file)(CactiErrorHandler)(/lib/functions.php: 4194 cacti_debug_backtrace)
2017-01-03 22:11:04 - ERROR PHP NOTICE: Undefined index: version in file: /usr/share/cacti/lib/snmpagent.php on line: 341
2017-01-03 22:11:04 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 704 snmpagent_poller_bottom)(/lib/snmpagent.php: 341 CactiErrorHandler)(/lib/functions.php: 4199 cacti_debug_backtrace)

BR
bernhard

Cacti Version 1.1.36 - Monitor Latest Develop Branch

If i use "view as list" and click on column "Status" i have this error into cacti log:

2018/03/06 14:58:45 - CMDPHP Input Validation Not Performed for 'sort_direction' Backtrace: (/plugins/monitor/monitor.php: 102 validate_request_vars)(/plugins/monitor/monitor.php: 604 validate_store_request_vars)(/lib/html_utility.php: 679 update_order_string)(/lib/html_utility.php: 722 get_request_var)(/lib/html_utility.php: 328 html_log_input_error)(/lib/html_validate.php: 44 cacti_debug_backtrace)
2018/03/06 14:58:45 - CMDPHP Input Validation Not Performed for 'sort_column' Backtrace: (/plugins/monitor/monitor.php: 102 validate_request_vars)(/plugins/monitor/monitor.php: 604 validate_store_request_vars)(/lib/html_utility.php: 679 update_order_string)(/lib/html_utility.php: 698 get_request_var)(/lib/html_utility.php: 328 html_log_input_error)(/lib/html_validate.php: 44 cacti_debug_backtrace)
2018/03/06 14:58:31 - CMDPHP Input Validation Not Performed for 'sort_direction' Backtrace: (/plugins/monitor/monitor.php: 102 validate_request_vars)(/plugins/monitor/monitor.php: 604 validate_store_request_vars)(/lib/html_utility.php: 679 update_order_string)(/lib/html_utility.php: 722 get_request_var)(/lib/html_utility.php: 328 html_log_input_error)(/lib/html_validate.php: 44 cacti_debug_backtrace)
2018/03/06 14:58:31 - CMDPHP Input Validation Not Performed for 'sort_column' Backtrace: (/plugins/monitor/monitor.php: 102 validate_request_vars)(/plugins/monitor/monitor.php: 604 validate_store_request_vars)(/lib/html_utility.php: 679 update_order_string)(/lib/html_utility.php: 698 get_request_var)(/lib/html_utility.php: 328 html_log_input_error)(/lib/html_validate.php: 44 cacti_debug_backtrace)

after install the plugin, i get errors in the Cacti Log

Hi,

after the successful installation, i tried to click the "monitor" Tab. Then i get following error message shown in the Cacti Logfile.

2017-01-04 11:26:49 - CMDPHP SQL Backtrace: (/plugins/monitor/monitor.php: 99 draw_page)(/plugins/monitor/monitor.php: 119 render_default)(/plugins/monitor/monitor.php: 629 db_fetch_assoc)(/lib/database.php: 310 db_fetch_assoc_prepared)(/lib/database.php: 348 cacti_debug_backtrace)

after activating the plugin debug-option in the settings, i get following SQL error.
2017-01-04 11:30:45 - DBCALL DEVEL: SQL Assoc: "SELECT DISTINCT h.* FROM host AS h LEFT JOIN thold_data AS td ON td.host_id=h.id WHERE h.disabled = "" AND h.monitor = "on" AND (availability_method>0 OR snmp_version>0 OR (td.thold_enabled="on" AND td.thold_alert>0) ) ORDER BY description"
2017-01-04 11:30:45 - DBCALL ERROR: SQL Assoc Failed!, Error:1146, SQL:"SELECT DISTINCT h.* FROM host AS h LEFT JOIN thold_data AS td ON td.host_id=h.id WHERE h.disabled = "" AND h.monitor = "on" AND (availability_method>0 OR snmp_version>0 OR (td.thold_enabled="on" AND td.thold_alert>0) ) ORDER BY description"
2017-01-04 11:30:45 - DBCALL ERROR: SQL Assoc Failed!, Error: Table 'cacti.thold_data' doesn't exist
2017-01-04 11:30:45 - CMDPHP SQL Backtrace: (/plugins/monitor/monitor.php: 99 draw_page)(/plugins/monitor/monitor.php: 119 render_default)(/plugins/monitor/monitor.php: 629 db_fetch_assoc)(/lib/database.php: 310 db_fetch_assoc_prepared)(/lib/database.php: 348 cacti_debug_backtrace)

i dont have the thold plugin installed - i think it will be good to have an dependencie checker when some plugin needs others to run correctly?

BR
Bernhard

Monitor plugin UI

  1. Last three buttons Refresh/Save/Mute better looks with class='status' but with diffrent collor for example or more fat border on buttons.

  2. There should be border: 1px black solid around the group of hosts and around the title of group it looks much more clear then. (Tree View and Device Template View)

  3. The host sholud be more compressed (Default, Tree and Device Template View)

  4. In the first list could be position "Text and Time" If You have 100+ hosts it's really hard to view all on a big screen."

Host Groups Sorting

There is:

  • no sorting of hosts groups (root branches) in monitor plugin

There should be:

  • sort groups like set in Management --> Trees --> Root (or other Branch) --> Set Sorting Type

URL Handler to devices

There should be a URL Handler to IP addresses in popups.

There should be links:
winbox://IP
mtr://IP
https://IP

So we can carry those links by browsers to specified program or use it by itself.
As a result, we do not need to type IP addresses for programs but we can open it by clicking icons and use browser url-handlers. If You are network device administrator this thing make Your work much simple.

http
mtr
winbox

It's easy to add that.

@@ -1142,6 +1148,17 @@ function ajax_status() {
                                <tr>
                                        <td style='vertical-align:top;'>" . __('Contact:') . "</td>
                                        <td style='vertical-align:top;'>" . $host['snmp_sysContact'] . "</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top;'><img src=./images/http.png></img> " . __('HTTP:') . "</td>
+                                       <td style='vertical-align:top;'>" . "<a href=https://".$host['hostname'] . ":5457 target=_blank>" . $host['hostname']."</a>" . "</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top;'><img src=./images/mtr.png></img> " . __('MTR:') . "</td>
+                                       <td style='vertical-align:top;'>" . "<a href=mtr:".$host['hostname'] . " target=_blank>" . $host['hostname']."</a>" . "</td>
+                               <tr>
+                                       <td style='vertical-align:top;'><img src=./images/winbox.png></img> " . __('Winbox:') . "</td>
']."</a>" . "</td>
                                </tr>":"") . "
                                </table>\n";

1.1.25 data sources

After upgrade 0.8.8 to 1.1.25 when click on

Console -> Data sources

we have wait for a many many time...

I found some trouble.

sql query left join between table data_template_rrd and graph_templates_item have result after many-many time...

some facts

mysql> select count(distinct(gti.task_item_id)) from graph_templates_item as gti;
+-----------------------------------+
| count(distinct(gti.task_item_id)) |
+-----------------------------------+
|                             40239 |
+-----------------------------------+
1 row in set (0,11 sec)

mysql> select count(distinct(dtr.id)) from data_template_rrd as dtr;
+-------------------------+
| count(distinct(dtr.id)) |
+-------------------------+
|                   41235 |
+-------------------------+
1 row in set (0,01 sec)

mysql> select count(distinct gti.local_graph_id) from data_template_rrd as dtr inner join graph_templates_item as gti on gti.task_item_id=dtr.id;
+------------------------------------+
| count(distinct gti.local_graph_id) |
+------------------------------------+
|                              19831 |
+------------------------------------+
1 row in set (0,17 sec)

mysql> select count(distinct gti.local_graph_id) from data_template_rrd as dtr left join graph_templates_item as gti on gti.task_item_id=dtr.id;
+------------------------------------+
| count(distinct gti.local_graph_id) |
+------------------------------------+
|                              19831 |
+------------------------------------+
1 row in set (8 min 15,71 sec)

If i change LEFT join to INNER join in data_sources.php between this two tables - this fix my trouble. Have any ideas?

More often avability checking than getting datas for graphs

I would like to check avability more often than getting datas for graphs.

I would see that as another option on "devices".
Check avability by 15/30/60/120/180....sec.

Maybe there should be another daemon obły for checking avability?

Undefined offset error

2017-02-02 12:02:30 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 85 ajax_status)(/plugins/monitor/monitor.php: 1075 CactiErrorHandler)(/lib/functions.php: 4238 cacti_debug_backtrace)
2017-02-02 12:02:30 - ERROR PHP NOTICE in Plugin 'monitor': Undefined offset: 6 in file: /cacti/plugins/monitor/monitor.php on line: 1075
2017-02-02 12:02:30 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 85 ajax_status)(/plugins/monitor/monitor.php: 1074 CactiErrorHandler)(/lib/functions.php: 4238 cacti_debug_backtrace)
2017-02-02 12:02:30 - ERROR PHP NOTICE in Plugin 'monitor': Undefined offset: 6 in file: /cacti/plugins/monitor/monitor.php on line: 1074

Cacti - Monitor - Call to undefined function get_current_page()

Hi,

I've just updated to the latest cacti release (v1.1.20).

Since then, monitor plugin keeps crashing with the following error :

2017-09-01 11:30:01 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'monitor'
2017-09-01 11:30:01 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4333 cacti_debug_backtrace)
2017-09-01 11:30:01 - ERROR PHP ERROR in Plugin 'monitor': Call to undefined function get_current_page() in file: /opt/cacti/plugins/monitor/setup.php on line: 381

Didn't see any anomaly while upgrading cacti and monitor v2.2 is installed.

I think i'm echoing that post : https://forums.cacti.net/viewtopic.php?f=14&t=57557

Any thoughts ?

Thanks in advance.

List instead of icons

Hi!

Would it be possible to have a list instead of the icons with the same data as the "onmouseover" data?

Thanks!

monitor display issue

Two issues with displaying.
1.First would be with multiple items in one category inside a root.Notice in the picture that the switch category has 23 items....last 2 items are on a next row that is under the other categories.
2.I have two trees there..notice in the picture that All Trees is selected to show but the second tree(2.Francizati) is displayed as the first one(1.Cacti Monitorizare) and the first one is completely missing from view.Also this makes the categories get mixed...one of the category named 3.Server should be in the second tree.

Here is a schema on how i suppose it should work:
Tree1
-cat1-cat2-cat3-
cat4-cat5
Tree2
-cat1-cat2-cat3

cacti

Some categories are emtpy..so them not being displayed is normal i guess...like my second tree has 3 categories but only one is populated with items.

Layout with Long Device Names

Hi All,

I have an interesting issue which popped up - not major, but more of an annoyance. Some of our devices have longer device names. I've found that this doesn't format very well in the monitor.php webpage (see picture below). I'm not much with PHP/HTML, so wondering if anyone would know a way to tweak the formatting so that it's all nice without the last item dropping to the next row by itself, or the blank column on the right?

image

Cheers!

expecting plugin_monitor_reboot_history table, but it doesn't exist

Hello,
I just checked out latest monitor code into plugins folder of latest cacti/develop commit (4a0f3ca143923712e79be345f0a7a94342c3e242) and I'm seeing these errors in the cacti log files. Looks like the plugin is looking for the plugin_monitor_reboot_history table, but it doesn't exist.

07/19/2016 12:52:04 PM - CMDPHP SQL Backtrace: (/plugins/monitor/poller_monitor.php: 130 purge_event_records)(/plugins/monitor/poller_monitor.php: 499 db_execute_prepared)(/lib/database.php: 173 cacti_debug_backtrace)
07/19/2016 12:52:04 PM - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti.plugin_monitor_reboot_history' doesn't exist
07/19/2016 12:52:04 PM - CMDPHP ERROR: A DB Exec Failed!, Error:1146, SQL:"DELETE FROM plugin_monitor_reboot_history WHERE log_time<FROM_UNIXTIME(UNIX_TIMESTAMP()-(? * 86400))'

PHP Error

I get this error messages in Cacti logging.

I have tried to fix it with errorcode 18, without any succes.

Cacti Log:

11/12/2017 23:55:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 103 draw_page)(/plugins/monitor/monitor.php: 129 render_default)(/plugins/monitor/monitor.php: 641 render_host)(/plugins/monitor/monitor.php: 956 CactiErrorHandler)(/lib/functions.php: 4408 cacti_debug_backtrace)

11/12/2017 23:55:05 - ERROR PHP NOTICE in Plugin 'monitor': Undefined offset: 127 in file: /usr/share/cacti/plugins/monitor/monitor.php on line: 956
11/12/2017 23:55:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 103 draw_page)(/plugins/monitor/monitor.php: 129 render_default)(/plugins/monitor/monitor.php: 641 render_host)(/plugins/monitor/monitor.php: 956 CactiErrorHandler)(/lib/functions.php: 4408 cacti_debug_backtrace)
11/12/2017 23:55:05 - ERROR PHP NOTICE in Plugin 'monitor': Undefined offset: 46 in file: /usr/share/cacti/plugins/monitor/monitor.php on line: 956
11/12/2017 23:55:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 103 draw_page)(/plugins/monitor/monitor.php: 129 render_default)(/plugins/monitor/monitor.php: 641 render_host)(/plugins/monitor/monitor.php: 956 CactiErrorHandler)(/lib/functions.php: 4408 cacti_debug_backtrace)
11/12/2017 23:55:05 - ERROR PHP NOTICE in Plugin 'monitor': Undefined offset: 127 in file: /usr/share/cacti/plugins/monitor/monitor.php on line: 956
11/12/2017 23:55:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/monitor/monitor.php: 103 draw_page)(/plugins/monitor/monitor.php: 129 render_default)(/plugins/monitor/monitor.php: 641 render_host)(/plugins/monitor/monitor.php: 956 CactiErrorHandler)(/lib/functions.php: 4408 cacti_debug_backtrace)
11/12/2017 23:55:05 - ERROR PHP NOTICE in Plugin 'monitor': Undefined offset: 127 in file: /usr/share/cacti/plugins/monitor/monitor.php on line: 956

Plugin seems to be working just fine.

My current setup:
Centos 6.9 / Apache/2.2.15 / PHP 5.6.32 (cli) (built: Oct 25 2017 07:00:59)
Cacti Version 1.1.28 / mysql Ver 14.14 Distrib 5.7.20,

Monitor reports reload, when it was unreachable.

After a larger deployment I noticed I was receiving Reboot Notifications on devices (maybe a few a day), that were not actually rebooting. This happens when a device sometimes fails to respond to SNMP queries during a polling cycle (annoying, but not abnormal), as I've caught the plugin_monitor_uptime.uptime going to 0. Tracing this back, this stems from host.snmp_sysUpTimeInstance going to 0, when mentioned, an snmp query times out.

My thought is that a snmp_sysUpTimeInstance value of 0 doesn't mean anything, other than it's unknown. When the device recovers, the monitor is comparing 0 to the last known uptime and fires the notification. Regardless, a 0 uptime, to me, is nonsense anyway. If it is really down, then it's down anyway, not rebooted. It's rebooted if, and only if, it has an uptime > 0 but < our last recorded value.

I'll be submitting a pull request, which modifies this a bit to only compare uptimes of non-0 values.

UI Improvement: Black Border and floating

@@ -845,7 +851,7 @@ function render_tree() {
                                FROM host AS h
                                WHERE id IN (" . implode(',', $host_ids) . ")");
 
-                       $result .= '<div style="padding:2px;margin:2px;width:100%;"><table class="odd" style="width:100%;"><tr class="tableHeader"><th>Non Tree Devices</th></tr><tr><td><div style="width:100%">';
+                       $result .= '<div style="padding:2px;margin:2px;width:100%;"><table class="odd" style="width:100%; border: 1px black solid;"><tr class="tableHeader" style="border: 1px black solid;"><th>Non Tree Devices</th></tr><tr><td><div style="width:100%">';
                        foreach($hosts as $leaf) {
                                $result .= render_host($leaf, true, $maxlen);
                        }
@@ -813,13 +819,13 @@ function render_tree() {
                                                if ($ptree != '') {
                                                        $result .= '</div></td></tr></table></div>';
                                                }
-                                               $result .= '<div style="padding:3px;margin:4px;width:100%;"><table class="odd" style="width:100%;margin-left:auto;margin-right:auto;"><tr class="tableHeader"><th>' . $tree_name . '</th></tr><tr><td><div style="width:100%">';
+                                               $result .= '<div style="padding:3px;margin:3px;width:100%;"><table class="odd" style="border: 1px black solid;width:100%;margin-left:auto;margin-right:auto;"><tr class="tableHeader"><th>' . $tree_name . '</th></tr><tr><td><div style="width:100%">';
                                                $ptree = $tree_name;
                                        }
 
                                        $title = $title !='' ? $title:'Root Folder';
 
-                                       $result .= '<div style="vertical-align:top;float:left;position:relative;height:' . intval(get_request_var('size') + 52) . 'px;padding:3px;margin:4px;white-space:nowrap;"><table class="odd"><tr class="tableHeader"><th>' . $title . '</th></tr><tr><td class="center"><div>';
+                                       $result .= '<div style="vertical-align:top;float:left;position:relative;height:float;padding:3px;margin:3px;white-space:nowrap;"><table class="odd" style="border: 1px black solid;"><tr class="tableHeader"><th>' . $title . '</th></tr><tr><td class="center"><div>';
                                        foreach($hosts as $host) {
                                                $result .= render_host($host, true, $maxlen);
                                        }


Please update the code.

  • Black border is much more visible.
  • Groups aren't overlapping by each other if group has many hosts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.