mirror of
https://github.com/Cacti/documentation.git
synced 2026-10-23 03:26:44 +09:00
More documentation (#192)
* add function has_data and remove_data * add few rows about deleting data * add server gone away * formatting * format again
This commit is contained in:
1 parent
1a0838d5ba
commit
b5ae06f189
3 files changed
+36
-1
No files matched your search
@@ -280,6 +280,17 @@ like `include_path = C:/Apache2/htdocs/cacti`.
|
||||
|
||||
## Common Problems
|
||||
|
||||
### I see "MySQL server has gone away" in cacti log and cacti does not work as expected
|
||||
|
||||
Check the following in MySQL/MariaDB
|
||||
```
|
||||
SHOW GLOBAL VARIABLES LIKE 'max_connections';
|
||||
SHOW GLOBAL STATUS LIKE 'max_used_connections';
|
||||
```
|
||||
|
||||
If they are close, increase the max_connections in the server.cnf (mysql.cnf, my.cnf)
|
||||
and restart MariaDB/MySQL.
|
||||
|
||||
### Cron is out of sync with the Poller Interval
|
||||
|
||||
```shell
|
||||
|
||||
@@ -42,7 +42,7 @@ setting | description
|
||||
*capabilities* | A comma delimited list of capabilities for define what capabilities the plugin has primarily remotely.
|
||||
*nosync* | A comma delimited list of relative paths that should not be synchronized with the remote data collectors, for example transient folders that may contain quite a bit of data that changes often.
|
||||
|
||||
## Functions
|
||||
## Mandatory functions
|
||||
|
||||
Inside the setup file, there are several functions that are mandatory in order
|
||||
for your plugin to properly be detected, and to properly function.
|
||||
@@ -114,6 +114,25 @@ function plugin_PLUGINNAME_check_config () {
|
||||
}
|
||||
```
|
||||
|
||||
## Optional functions
|
||||
Some plugins delete all your data and settings when you uninstall them.
|
||||
However, some plugins preserve the data and can be used again in the future.
|
||||
The following 2 functions allow you to delete all data and settings without
|
||||
uninstalling the plugin or manually deleting them.
|
||||
If the plugin does not contain the function, the delete icon will not appear
|
||||
in the settings (console -> configuration -> plugins).
|
||||
These functions are used in version 1.3 and higher.
|
||||
|
||||
```php
|
||||
function plugin_PLUGINNAME_has_data() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function plugin_PLUGINNAME_remove_data() {
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
#### Registering Hooks
|
||||
|
||||
The way that your plugin is able to interact within Cacti is via the many hooks
|
||||
|
||||
@@ -112,6 +112,11 @@ plugin.
|
||||
|
||||

|
||||
|
||||
### Delete plugin data and settings
|
||||
Some plugins have new functionality and allow you to delete data and plugin
|
||||
settings and start from scratcg. This can be done with the trash can icon in
|
||||
Console > Configuration > Plugins
|
||||
|
||||
---
|
||||
|
||||
Copyright (c) 2004-2024 The Cacti Group
|
||||
Reference in new issue
Block a user