docs(plugins): [1.2.x] correct how-to, plugin development and standards pages against the source (#271)

* docs(plugins): [1.2.x] correct the hook reference against the hooks the core fires

Add the hooks the 1.2.x core fires that the page did not list, correct file locations and introduced/retired versions, mark hooks that are no longer fired as retired, and drop duplicate sections and an unlinked index entry.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(plugins): [1.2.x] correct plugin pages against the plugin API and plugin sources

Fix the INFO key name and delimiter, the hook used in the registration examples, the setup function requirements, the dependency example, and menu, table and template details in the Mactrack and Syslog pages.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(howto): [1.2.x] correct how-to pages against the 1.2.x user interface and data query code

Fix form labels, resource directory names, re-index method names, the index_order delimiter, the maximum value advice, and the cacti_snmp_get call in the script query example.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(standards): [1.2.x] correct standards pages against the 1.2.x tree

Fix the prepared statement example, the CLI include path, the CHANGELOG location, the CI reference and the include/vendor directory list.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(plugins): [1.2.x] align the Syslog SQL mode section with the plugin README

The plugin README says not to copy NO_AUTO_CREATE_USER into a current MySQL configuration and to inspect the active modes instead.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(standards): [1.2.x] fix example typo, indentation rule, constants and table name

Correct the $$ typo in the script query example, the vim rules to use tabs as CLAUDE.md requires, the example constants to match include/global_constants.php, and the user_auth_realm table name.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(standards): [1.2.x] correct the CI and MD001 statements for this branch

The 1.2.x branch has no Travis CI configuration or workflow, and .mdl_style.rb disables MD001.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(translations): [1.2.x] correct the locales listing, template update steps and typos

Describe what update-pot.sh, build_gettext.sh and build_mo.sh do on 1.2.x, add the plugin script, link Poedit's home page, and fix typos.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
This commit is contained in:
Thomas Vincent authored and GitHub committed 2026-11-23 15:11:29 -05:00
1 parent 7d539f7b68
commit 77578446a4
19 files changed
+402 -252

No files matched your search

+47 -17
View File
@@ -5,9 +5,9 @@
If you wish to help with the development of translations of Cacti from English
to other languages, the Cacti Group has simplified the process for you.
You simply have to goto the following Web Site and create an account.
You simply have to go to the following Web Site and create an account.
[Cacti Translation Site](https://translate.cacti.net). From there, you can
simply select what you want translated, and the push the "translate" button on
simply select what you want translated, and then push the "translate" button on
your language of choice, and the beauty of the translation is that if the string
that you translate is in another plugin, it can also be automatically translated
at the same time.
@@ -17,35 +17,59 @@ to GitHub programmatically. To install the new language strings, you simply have
to update the `locales` directory from the latest GitHub branch that you were
translating.
The `locales` directory has two separate subdirectories. They are:
The `locales` directory has two subdirectories and four files. They are:
```console
# ls -1 locales/
LC_MESSAGES
build_gettext.sh
build_mo.sh
index.php
po
update-pot.sh
```
The LC_MESSAGES includes the compiled language files, and the po directory
includes not only the base Cacti translation file `cacti.pot`, but all currently
supported languages as well.
supported languages as well. The scripts are described in the next section.
## Pull Requests
If you are making changes to the core Cacti code that involve new strings to be
translated, you have to ensure that your Pull Request includes an updated
`cacti.pot` file. To update the `cacti.pot` file, you simply open a shell and
change to the `locales` directory and run the script `build_gettext.sh`. It will
scan the Cacti source code for all strings to be internationalized and update
the `cacti.pot` file.
If you are making changes to the core Cacti code that add, change or remove
strings to be translated, your Pull Request should include an updated
`locales/po/cacti.pot` file. Open a shell and run the script `update-pot.sh`
from the `locales` directory:
If you include the updated file in your pull request, it will keep the
development engine running smooth.
```console
cd locales
./update-pot.sh
```
The script locates the Cacti base directory from its own path, so it can also
be started from elsewhere. It requires `realpath` and `xgettext` (GNU gettext).
It scans the PHP files in the Cacti source for strings to be internationalized
and rewrites only `locales/po/cacti.pot`. You can check the result with
`msgfmt --check-format -o /dev/null locales/po/cacti.pot`. Commit only
`cacti.pot` with your code change. The per-language `.po` files and the compiled
`.mo` files are left to the translation site, which commits them itself.
Do not use `build_gettext.sh` for a code Pull Request. As well as rebuilding
`cacti.pot`, it runs `msgmerge --update` on every `.po` file in `locales/po` and
then compiles every `.po` file into `locales/LC_MESSAGES`, so following it
changes every language catalog. The `build_mo.sh` script only compiles the `.po`
files into `.mo` files.
Plugins have a `locales/build_gettext.sh` script and no `update-pot.sh`. It
works as described above: it rebuilds `locales/po/cacti.pot` from the plugin's
PHP files, merges the changes into every `.po` file and compiles the `.mo`
files. Language catalogs of plugins are also maintained through the translation
site, which commits them to the plugin repository. If you run the script for a
plugin Pull Request, review the diff and keep the Pull Request to the template.
## Translating using other tools
You may use other tools to Translate Cacti as well. One popular tool is PO
Editor, you can download it here: [Poedit Pro](https://poedit.net/pro). The tool
does work well and also run machine translations for you at an added cost.
You may use other tools to Translate Cacti as well. One popular tool is
Poedit, you can download it here: [Poedit](https://poedit.net/).
If you choose to use that route, you will need to still have a Cacti Translation
account. From there, you can upload your modified `language.po` files into the
@@ -68,7 +92,13 @@ interface directly. See the Weblate documentation on how to upload your modified
1. Cacti and its plugins get updates very often. To make sure the translations
are up to date, the translator should download the latest version and run
`build_gettext.sh` to create an up-to-date version of cacti.pot.
`update-pot.sh` (`build_gettext.sh` in a plugin) to create an up-to-date
version of cacti.pot.
When translating, preserve placeholders such as `%s` and `%d`, plural forms and
formatting markers exactly as they appear in the original string. Check messages
that contain substituted values, and messages with accented or non-Latin
characters, on a test installation.
## Editing PO Files
@@ -80,7 +110,7 @@ Cacti will need these files name in hyphenated format, so: `fr_FR.po`, becomes
## Considerations
As Cacti is GPL2.0+, you acknowledge, by sigining up to the Cacti Weblate site,
As Cacti is GPL2.0+, you acknowledge, by signing up to the Cacti Weblate site,
that your contributions will be GPL2.0+ as well.
---
+9 -7
View File
@@ -79,14 +79,16 @@ Please go to **Data Templates** and click Add. You should see:
![Data Templates New](images/r-dt1.png)
Fill in the **Data Templates Name** with a reasonable text. This name will be
used to find this Template among others. Then fill in the **Data Source Name**.
This is the name given to the host-specific **Data Source**. The variable
Fill in the template **Name** with a reasonable text. This name will be used to
find this Template among others. Then fill in the **Name** of the **Data
Source**. This is the name given to the host-specific **Data Source**. The
variable
**|host_description|** is taken from the actual **Device**. This is to
distinguish **Data Sources** for different devices. The **Data Input Method** is
a drop down containing all known scripts and the like. Select the **Data Input
Method** you just created. The **Associated RRA's** is filled by default. At the
moment there's no need to change this. The lower part of the screen looks like:
Method** you just created. The **Data Source Profile** is filled by default. At
the moment there's no need to change this. The lower part of the screen looks
like:
![Data Source Item](images/r-dt2.png)
@@ -98,8 +100,8 @@ may look nicer. Click create to see:
Notice the new drop down **Output Field**. As there is only one Output Field
defined by our **Data Input Method**, you'll see only this. Here's how to
connect the **Data Source Name** (used in the RRDfile) to the Output Field of
the Script. Click **Save** and you're done.
connect the **Internal Data Source Name** (used in the RRDfile) to the Output
Field of the Script. Click **Save** and you're done.
## Creating the Graph Template
+9 -9
View File
@@ -24,7 +24,7 @@ e.g. ifInOctets, ifOutOctets, ifInErrors, …The XML file knows them as
```
Lets have an example: standard Interface MIB with the corresponding part of the
`<path_cacti>/resources/snmp_queries/interfaces.xml` file are displayed using
`<path_cacti>/resource/snmp_queries/interface.xml` file are displayed using
the following table:
![SNMP Table 1](images/snmp-dqw-table1.png)
@@ -57,10 +57,10 @@ output parameters of a script (see ping.pl script above). These are the readings
from the device. By selecting the appropriate row (the one grayed out had been
selected by me), you tell cacti to retrieve data from the interface defined by
this index. But how does cacti know, what output parameters it shall retrieve?
See the Select a Graph type dropdown. It specifies a **Graph Template** defined
for this Data Query. The Graph Template in turn references a **Data Template**
which incorporates the needed output parameters as Data Sources. This works
quite the same way as defined for a Data Input Method.
See the **Select a Graph Type to Create** dropdown. It specifies a **Graph
Template** defined for this Data Query. The Graph Template in turn references a
**Data Template** which incorporates the needed output parameters as Data
Sources. This works quite the same way as defined for a Data Input Method.
To sum up: the SNMP XML file is somehow a **replacement** for the **Data Input
Method** described above to be used on indexed values. It tells cacti, what data
@@ -69,7 +69,7 @@ indexes, the XML defines descriptive parameters (direction: input) to be
displayed in the selection table.
A walkthrough for this is given now. It is based on the already supplied
interfaces.xml XML file.
interface.xml XML file.
## Create a Data Query to tell cacti how to retrieve data
@@ -100,7 +100,7 @@ from the *Data Source Item* heading to see:
The name of the internal RRDtool Data Source (ifOutOctets) is not replaced in
the Tab until you save your work. By default, *Maximum Value* is set to 100.
This is way too low for an interface. All readings above this value will be
stored as NaN by RRDtool. To avoid this, set to 0 (no clipping) or to a
stored as NaN by RRDtool. To avoid this, set to U (no maximum) or to a
reasonable value (e.g. interface speed). Don't forget to specify COUNTER! You
will have noticed, that the name of the data source does not match the Name in
the interface.xml. Don't worry, the solution to this is given later on. Before
@@ -132,7 +132,7 @@ we can use the ones created for the other **Data Query**.
Now it's time to re-visit our **Data Query**. Remember the **Associated Graph
Template** we've left alone in the very first step? Now it will get a meaning.
Go to **Data Queries** and select our new one. Then press the plus (+) glyph,
and select *Interface - Traffic (bits/second)* from the drop down as shown
and select *Interface - Traffic (bits/sec)* from the drop down as shown
below. Press **Create** to initialize the association of this **Graph
Template** with out new **Data Query**.
@@ -179,7 +179,7 @@ Now go to your **Device** to add the **Associated Data Query**:
![Apply Data Query to your Device](images/r-dq-dev1-0.png)
Click **Add** and then **Create Graphs for this Host** to see:
Click **Add** and then **Create Graphs for this Device** to see:
![Create Graphs for Data Query](images/r-dq-dev2.png)
+17 -14
View File
@@ -26,7 +26,7 @@ SNMP table: HOST-RESOURCES-MIB::hrStorageTable
```
This given, the first step will be the definition of an XML file based on those
OIDs. So change to your `<path_cacti>/resources/snmp_queries` directory and
OIDs. So change to your `<path_cacti>/resource/snmp_queries` directory and
create a file named **hrStorageTable.xml**. You may of course choose your own
name, but for me it seems appropriate to take the name of the SNMP Table itself.
Before doing so, it is necessary to identify the Index of that table. Without
@@ -110,7 +110,7 @@ and **Add** a new one:
![SNMP Table 2 - Data Query](images/dq-02.preview.png)
Fill in Short and Long Names at your wish. Enter the file name of the XML file
and don't forget to choose **Get SNMP Data (indexed)**. **Create** to see
and don't forget to choose **Get SNMP Data (Indexed)**. **Create** to see
![SNMP Table 3 - Data Query](images/dq-03.preview.png)
@@ -120,8 +120,9 @@ and add the new **Data Query** as shown:
![SNMP Table 1 - Device](images/dev-01.preview.png)
**Index Count Changed** was chosen on purpose to tell cacti to re-index not only
on reboot but each time the Index Count (e.g. number of partitions) changed.
**Index Count** was chosen on purpose as the **Re-Index Method** to tell cacti
to re-index not only on reboot but each time the Index Count (e.g. number of
partitions) changed.
When done, see the results as
![SNMP Table 2 - Device](images/dev-02.preview.png)
@@ -211,7 +212,7 @@ When using **Verbose Query**, you'll now find
![SNMP Table 5 - Devices](images/dev-12.preview.png)
And clicking **Create Graphs for this host** will result in
And clicking **Create Graphs for this Device** will result in
![SNMP Table 6 - Devices](images/dev-13.preview.png)
@@ -285,7 +286,7 @@ This works very much the same way as above.
Now we may proceed as said above: Pressing the green circle runs that XML
definitions against the host and updates the rows/columns. You will notice the
“missing” second column only when Create Graphs for this Host is selected.
“missing” second column only when Create Graphs for this Device is selected.
---
@@ -302,9 +303,10 @@ Tasks. Please go to **Data Templates** and **Add**:
![SNMP Table 1 - Data Template](images/dt-01.preview.png)
Define the **Name** of the Data Template. When defining the Name of the **Data
Source**, do not forget to check the **Use Per-Data Source Value (Ignore this
Value)** checkbox. This will come in useful later. Data Input Method will read
**Get SNMP Data (Indexed)**. Select the **Data Source Profile** as usual:
Source**, do not forget to check the checkbox that allows the user to override
the value during Data Source creation. This will come in useful later. Data
Input Method will read **Get SNMP Data (Indexed)**. Select the **Data Source
Profile** as usual:
![SNMP Table 2 - Data Template](images/dt-02.preview.png)
@@ -320,7 +322,7 @@ second **Data Source Item**:
Please pay attention to setting the **Maximum Value** to 'U' (no limit). Else,
all values exceeding the pre-defined as **NaN**. Now scroll down to the bottom
of the page and check **Index Type, Index Value and Output Type Id**
of the page and check **Index Type, Index Value and Output Type ID**
![SNMP Table 5 - Data Template](images/dt-05.preview.png)
@@ -334,8 +336,9 @@ Please go to Graph Templates and Add:
![Defining Graph Template](images/gt-01.preview.png)
Fill in the header names and don't forget to check the **Use Per-Graph Value
(Ignore this Value)** for the **Graph Template Title**:
Fill in the header names and don't forget to check the checkbox that allows the
user to override the value during Graph creation for the **Graph Template
Title**:
![Graph Template Preview](images/gt-02.preview.png)
@@ -382,7 +385,7 @@ Now the **Data Query** is complete:
## Create Graphs for this Host
Now we're almost done. Everything's ready for use now. So go to your device and
select **Create Graphs for this Host**. Select some of the partitions you're
select **Create Graphs for this Device**. Select some of the partitions you're
interested in:
![Create Graphs for this host](images/dev-20.preview.png)
@@ -448,7 +451,7 @@ see:
![Data Query Debug Info](images/dev-30.png)
Now select **Create Graphs for this Host** and notice the change of the column
Now select **Create Graphs for this Device** and notice the change of the column
**Allocation Units (Bytes)**. The string “Bytes” has gone:
![Data Query Table](images/dev-31.preview.png)
+18 -16
View File
@@ -173,7 +173,7 @@ The values of interest are stored in `$return_arr[$i] = $arr[$i][“value”];`.
## XML File
This given, the first step will be the xml file defining how to access index
values only. So change to your `<path_cacti>/resources/script_queries` directory
values only. So change to your `<path_cacti>/resource/script_queries` directory
and create a file named **ifTraffic.xml**. You may of course choose your own
name.
@@ -221,7 +221,7 @@ and **Add** a new one:
![Script Data Query - Add 02](images/dq-add-02.preview.png)
Fill in Short and Long Names at your wish. Enter the file name of the XML file
and don't forget to choose **Get Script Data (indexed)**. **Create** to see
and don't forget to choose **Get Script Data (Indexed)**. **Create** to see
![Script Data Query - Add 03](images/dq-add-03.preview.png)
@@ -231,8 +231,9 @@ and add the new **Data Query** as shown:
![Script Data Query - Associate 01](images/dev-dq-01.preview.png)
**Index Count Changed** was chosen on purpose to tell cacti to re-index not only
on reboot but each time the Index Count (e.g. number of interfaces) changed.
**Index Count** was chosen on purpose as the **Re-Index Method** to tell cacti
to re-index not only on reboot but each time the Index Count (e.g. number of
interfaces) changed.
When done, see the results as
![Script Data Query - Associate 02](images/dev-dq-02.preview.png)
@@ -381,11 +382,11 @@ Last option is the **get** function
# it has to respond with
# the description of the interface for interface #1
# -------------------------------------------------------------------------
} elseif ($cmd == "get" $$ isset($query_field) && isset($query_index)) {
} elseif ($cmd == "get" && isset($query_field) && isset($query_index)) {
print (cacti_snmp_get($hostname, $snmp_community,
$oids[$query_field] . ".$query_index", $snmp_version, $snmp_auth_username,
$snmp_auth_password, $snmp_auth_protocol, $snmp_priv_passphrase, $snmp_priv_protocol,
$snmp_context, $snmp_port, $snmp_timeout, $snmp_retries, $max_oids, SNMP_POLLER));
$snmp_context, $snmp_port, $snmp_timeout, $snmp_retries, SNMP_POLLER));
```
The rest of it is left unchanged. For sake of completeness, I repeat it here
@@ -428,7 +429,7 @@ shown, but is repeated here
### The Complete XML File
Of course, we now will have to complete the XML file given in Chapter II. Find
it at `<path_cacti>/resources/script_queries/ifTraffic.xml`.
it at `<path_cacti>/resource/script_queries/ifTraffic.xml`.
```xml
<interface>
@@ -452,7 +453,7 @@ Let's discuss the changes
| arg_query | The string passed to the query to perform query requests is given here. So you may modify it to your liking (in this case, the script has to be modified accordingly). |
| arg_get | Some as above for get requests |
| output_delimiter | The delimiter used for query requests to separate index and value |
| index_order (optional) | Cacti will attempt to find the best field to index off of based on whether each row in the query is unique and non-null. If specified, Cacti will perform this check on the fields listed here in the order specified. Only input fields can be specified and multiple fields should be delimited with a comma. |
| index_order (optional) | Cacti will attempt to find the best field to index off of based on whether each row in the query is unique and non-null. If specified, Cacti will perform this check on the fields listed here in the order specified. Only input fields can be specified and multiple fields should be delimited with a colon. |
| index_title_format (optional) | Specify the title format to use when representing an index to the user. Any input field name can be used as a variable if enclosed in pipes ( ). The variable `chosen_order_field` will be substituted with the field chosen by Cacti to index off of (see index_order above). Text constants are allowed as well |
| index_order_type (optional) | For sorting purposes, specify whether the index is numeric or alphanumeric. |
@@ -634,16 +635,17 @@ and find:
![Script Data Query - Data Template 02](images/dev-dt-02.preview.png)
Fill in **Data Template Name**, **Data Source Name**, and, most important,
Fill in the template **Name**, the **Name** of the **Data Source**, and, most
important,
select **Data Input Method** to read **Get Script Data (Indexed)**, and **Data
Source Profile**.
When creating the **Data Template** and **Graph Template**, you SHOULD check the
`Use Per Data Source Value` checkbox for name & title. When you first create
graphs using the data query, it will use the `Suggested Values` to name the
templates. But then if you ever edit the templates and leave the
`Use Per Data Source Value` unchecked, then saving will overwrite all the data
source and graph names.
checkbox that allows the user to override the value during Data Source or Graph
creation for name & title. When you first create graphs using the data query,
it will use the `Suggested Values` to name the templates. But then if you ever
edit the templates and leave that checkbox unchecked, then saving will
overwrite all the data source and graph names.
Now, before you press the `Create` button also please proceed to the lower half
of the form and complete the first RRDfile Data Source. Enter the **Internal
@@ -658,7 +660,7 @@ For the second data source item, please select **New**.
![Script Data Query - Data Template 05](images/dev-dt-05.png)
Again, fill in the Data Source Name. Pay attention to set the maximum value to 0
Again, fill in the Data Source Name. Pay attention to set the maximum value to U
to avoid clipping it off during updating of the RRDfile. COUNTER has to be set
as done above. **Important!** You have to select the marked Index fields! Now,
save again and you're done.
@@ -791,7 +793,7 @@ Don't worry about the first two entries; they are home-made.
## Creating the Images
Now, let's return to the **Device**, that we've already have used for this Data
Query. **Create Graphs for this Host**
Query. **Create Graphs for this Device**
![Script Data Query - Devices 01](images/dev-dev-10.preview.png)
+34 -31
View File
@@ -24,7 +24,7 @@ To manage **Devices** within Cacti, click on the Devices menu item. Clicking Add
will bring up a new device form. The first two fields, Description and Hostname
are the only two fields that require your input beyond the defaults. If your
host type is defined under the host template dropdown, be sure to select it
here. You can always choose "Generic SNMP-enabled Host" if you are just
here. You can always choose "Generic SNMP Device" if you are just
graphing traffic or "None" if you are unsure. It is important to remember that
the host template you choose will not lock you into any particular
configuration, it will just provide more intelligent defaults for that type of
@@ -41,13 +41,13 @@ host.
resolved using the standard host resolving mechanisms, e.g. Dynamic Name
Services (DNS)
- **Host Template** - A Host Template is a container for a list of graph
- **Device Template** - A Host Template is a container for a list of graph
templates that will be related to this host.
- **Notes** - Notes for a given device.
- **Disable Host** - Exclude this host from being polled. This is of particular
value, if a device is no longer available, but should be
- **Disable Device** - Exclude this host from being polled. This is of
particular value, if a device is no longer available, but should be
kept e.g. as a reference.
### Availability/Reachability Options
@@ -58,19 +58,21 @@ host.
- _**PING or SNMP Uptime**_ - Ping and if successful, move on, if not check SNMP Uptime
- _**SNMP Uptime**_ - verify the SNMP Uptime only
- _**SNMP Desc**_ - verify the SNMP System Description
- _**SNMP GetNext**_ - verify the very next SNMP OID after .1.3
- _**SNMP getNext**_ - verify the very next SNMP OID after .1.3
- _**PING**_ - perform a ping test, see below
- **Ping Method** - Available only for _**PING and SNMP**_ or _**PING**_
- _**ICMP**_ - perform ICMP tests. Requires permissions
- _**UDP**_ - perform a UDP test
- _**TCP**_ - perform a TCP test
- _**ICMP Ping**_ - perform ICMP tests. Requires permissions
- _**TCP Ping**_ - perform a TCP test
- _**TCP Ping Closed**_ - perform a TCP test and treat a refused connection
as a response from the device
- _**UDP Ping**_ - perform a UDP test
- **Ping Port** - Available only for UDP/TCP PING test types. Please define the
port to be tested here. Make sure, that no firewall
intercepts the test ping.
- **Timeout Value** - After this time, the test fails. Measured in units of
- **Ping Timeout Value** - After this time, the test fails. Measured in units of
milliseconds.
- **Ping Retry Count** - The number of times Cacti will attempt to ping a host
@@ -84,14 +86,14 @@ host.
- _**Version 2**_ - Referred to as SNMP V2c in most SNMP documentations
- _**Version 3**_ - SNMP V3, supporting authentication and encryption
- **SNMP Community** - SNMP read community for this device
- **SNMP Community String** - SNMP read community for this device
- **SNMP Port** - UDP port number to use for SNMP (default is 161).
- **SNMP Timeout** - Maximum number of milliseconds Cacti will wait for an SNMP
response.
- **Maximum OID's Per Get Request** - This is a performance feature. Specifies
- **Maximum OIDs Per Get Request** - This is a performance feature. Specifies
the number of OID's that can be obtained in a single SNMP Get request.
_**WARNING**_: This feature only works when using Spine.
_**WARNING**_ Some devices do not support values greater than `1` and/or may
@@ -99,30 +101,30 @@ host.
### Security Options for SNMP V3
- _**SNMP Username**_ - `username` of an SNMP V3 `createUser` statement or
equivalent
- _**SNMP Password**_ - `authpassphrase` of an SNMP V3 `createUser` statement
- _**SNMP Username (v3)**_ - `username` of an SNMP V3 `createUser` statement
or equivalent
- _**SNMP Auth Protocol**_ - Authentication type of an SNMP V3 `createUser`
statement or equivalent. Select either MD5, SHA, SHA-224, SHA-256, SHA-392,
or SHA-512. Defaults to MD5.
- _**SNMP Password (v3)**_ - `authpassphrase` of an SNMP V3 `createUser`
statement or equivalent
- _**SNMP Privacy Passphrase**_ - The `privacy passphrase` of an SNMP V3
- _**SNMP Auth Protocol (v3)**_ - Authentication type of an SNMP V3
`createUser` statement or equivalent. Select either MD5, SHA, SHA-224,
SHA-256, SHA-384, or SHA-512. Defaults to SHA.
- _**SNMP Privacy Passphrase (v3)**_ - The `privacy passphrase` of an SNMP V3
`createUser` statement or equivalent.
- _**SNMP Privacy Protocol**_ - The `privacy protocol` of an SNMP V3
`createUser` statement or equivalent. Select DES (if available), AES-128,
AES-192, or AES-256. Defaults to DES.
- _**SNMP Privacy Protocol (v3)**_ - The `privacy protocol` of an SNMP V3
`createUser` statement or equivalent. Select DES (if available), AES,
AES-128, AES-192, AES-192-C, AES-256, or AES-256-C. Defaults to AES.
**NOTE** Spine may not support DES today as some Net-SNMP distributions
have disabled it.
- _**SNMP Context**_ - When using the View-Based Access Control Model (VACM),
it is possible to specify an SNMP Context when mapping a community name to
a security name with a `com2sec` directive, with the `group` directive and
the `access` directive. This allows for defining special access models. If
- _**SNMP Context (v3)**_ - When using the View-Based Access Control Model
(VACM), it is possible to specify an SNMP Context when mapping a community
name to a security name with a `com2sec` directive, with the `group` directive
and the `access` directive. This allows for defining special access models. If
using such a parameter with your target's SNMP configuration, specify the
context name to be used to access that target here.
@@ -307,7 +309,7 @@ IF-MIB::ifType.3 = INTEGER: ethernetCsmacd(6)
Now that you have created some devices, it is time to create graphs for these
devices. To do this, select the New Graphs menu option under the Create
heading. If you're still at the device edit screen, select Create Graphs for
this Host to see a screen similar to the image pictured below.
this Device to see a screen similar to the image pictured below.
![Creating New Graphs](images/new-graphs.png)
@@ -321,10 +323,11 @@ additional things to keep in mind. First is that you may encounter the
situation as pictured above with the "SNMP - Interface Statistics" data query.
If this occurs you may want to consult the section on debugging data queries to
see why your data query is not returning any results. Also, you may see a
"Select a graph type" dropdown box under some data query boxes. Changing the
value of this dropdown box affects which type of graph Cacti will make after
clicking the Create button. Cacti only displays this dropdown box when there is
more than one type to choose from, so it may not be displayed in all cases.
"Select a Graph Type to Create" dropdown box under some data query boxes.
Changing the value of this dropdown box affects which type of graph Cacti will
make after clicking the Create button. Cacti only displays this dropdown box
when there is more than one type to choose from, so it may not be displayed in
all cases.
Once you have selected the graphs that you want to create, simply click the
Create button at the bottom of the page. You will be taken to a new page that
+15 -13
View File
@@ -38,7 +38,7 @@ setting | description
*email* | The authors email address for obtaining support.
*homepage* | If the author maintains a homepage, the address for that page.
*compat* | The minimum version of Cacti that is required to use this plugin.
*depends* | A space delimited list of plugins:version that are required to use this plugin.
*requires* | A space delimited list of plugins:version that are required to use this plugin.
*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.
@@ -59,7 +59,7 @@ register_hook function later in this document.
```php
function plugin_PLUGINNAME_install () {
api_plugin_register_hook('PLUGINNAME', 'top_header_tabs', 'PLUGINNAME_show_tab', 'setup.php');
api_plugin_register_hook('PLUGINNAME', 'top_graph_header_tabs', 'PLUGINNAME_show_tab', 'setup.php');
}
```
@@ -68,7 +68,8 @@ function plugin_PLUGINNAME_install () {
The next function is the uninstall function. This is a function that is called
when someone requests to uninstall your plugin. You can use this to clean up
any extra data that is left by your plugin. If you used the API function to
install any tables, they will be cleaned up automatically.
install any tables, they will be cleaned up automatically. Cacti only calls
this function if the plugin defines it.
### plugin_PLUGINNAME_version
@@ -95,14 +96,15 @@ The last mandatory function is used for determining whether your plugin is
ready to be enabled after being installed.
When a plugin is installed, it starts in a disabled state. Only a few of the
necessary hooks for the plugin are enabled. These are the config_settings and
config_arrays hook. Anything that uses those hooks will still be available
while the plugin is disabled. This allows a user to modify any necessary
settings for the plugin before the plugin is actually enabled and goes live.
You can then use this check_config function to determine whether everything is
correctly setup, before you allow the plugin to be enabled. From this
function, you will simply need to return TRUE if everything checks out, or
return FALSE if something else needs to be setup.
necessary hooks for the plugin are enabled. These are the config_settings,
config_arrays and config_form hooks. Anything that uses those hooks will still
be available while the plugin is disabled. This allows a user to modify any
necessary settings for the plugin before the plugin is actually enabled and goes
live. You can then use this check_config function to determine whether
everything is correctly setup, before you allow the plugin to be enabled. From
this function, you will simply need to return TRUE if everything checks out, or
return FALSE if something else needs to be setup. If the plugin does not define
this function, Cacti treats the plugin as ready to be enabled.
```php
function plugin_PLUGINNAME_check_config () {
@@ -159,7 +161,7 @@ Cacti's Console, your setup.php file may look like this.
```php
function plugin_PLUGINNAME_install () {
api_plugin_register_hook('PLUGINNAME', 'top_header_tabs', 'PLUGINNAME_show_tab', 'setup.php');
api_plugin_register_hook('PLUGINNAME', 'top_graph_header_tabs', 'PLUGINNAME_show_tab', 'setup.php');
}
function PLUGINNAME_show_tab () {
@@ -199,7 +201,7 @@ So to follow our example, your install function would look like this
```php
function plugin_PLUGINNAME_install () {
api_plugin_register_hook('PLUGINNAME', 'top_header_tabs', 'PLUGINNAME_show_tab', 'setup.php');
api_plugin_register_hook('PLUGINNAME', 'top_graph_header_tabs', 'PLUGINNAME_show_tab', 'setup.php');
api_plugin_register_realm('PLUGINNAME', 'PLUGINNAME.php,', 'View PLUGINNAME', 1);
}
```
+2 -2
View File
@@ -55,7 +55,7 @@ details on performing each step.
- Remove instances of including top_header.php, top_graph_header.php,
top_general_header.php and replacing with function calls top_header(),
bottom_footer(), top_graph_header(), and top_general_header(). (mandatory)
bottom_footer(), top_graph_header(), and general_header(). (mandatory)
- Adding '&header=false' to most header() function calls to drive Ajax
rendering. (mandatory)
@@ -115,7 +115,7 @@ includes the following sections:
supported.
- **requires** - The list of plugins and versions that the current plugin needs
in order to operate. This is a comma delimited list of Plugins with version
in order to operate. This is a space delimited list of Plugins with version
attributes similar to the **compat** section.
- **capabilities** - a comma delimited string of capabilities defining how the
+201 -87
View File
@@ -3,55 +3,58 @@
The following table shows all known Cacti plugin hooks and a brief description
of their function.
| hook | hook | hook |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [add_graph_template_to_host](Plugin-Hook-API-Ref.md#add_graph_template_to_host) | [api_device_new](Plugin-Hook-API-Ref.md#api_device_new) | [api_device_save](Plugin-Hook-API-Ref.md#api_device_save) |
| [auth_alternate_realms](Plugin-Hook-API-Ref.md#auth_alternate_realms) | [auth_profile_reset](Plugin-Hook-API-Ref.md#auth_profile_reset) | [auth_profile_reset_value](Plugin-Hook-API-Ref.md#auth_profile_reset_value) |
| [auth_profile_run_action](Plugin-Hook-API-Ref.md#auth_profile_run_action) | [auth_profile_save](Plugin-Hook-API-Ref.md#auth_profile_save) | [auth_profile_tabs](Plugin-Hook-API-Ref.md#auth_profile_tabs) |
| [auth_profile_update_data](Plugin-Hook-API-Ref.md#auth_profile_update_data) | [boost_poller_bottom](Plugin-Hook-API-Ref.md#boost_poller_bottom) | [bottom_footer](Plugin-Hook-API-Ref.md#bottom_footer) |
| [cacti_stats_update](Plugin-Hook-API-Ref.md#cacti_stats_update) | [change_password_title](Plugin-Hook-API-Ref.md#change_password_title) | [clog_regex_array](Plugin-Hook-API-Ref.md#clog_regex_array) |
| [config_arrays](Plugin-Hook-API-Ref.md#config_arrays) | [config_form](Plugin-Hook-API-Ref.md#config_form) | [config_insert](Plugin-Hook-API-Ref.md#config_insert) |
| [config_settings](Plugin-Hook-API-Ref.md#config_settings) | [console_after](Plugin-Hook-API-Ref.md#console_after) | [console_before](Plugin-Hook-API-Ref.md#console_before) |
| [copy_user](Plugin-Hook-API-Ref.md#copy_user) | [create_complete_graph_from_template](Plugin-Hook-API-Ref.md#create_complete_graph_from_template) | [custom_denied](Plugin-Hook-API-Ref.md#custom_denied) |
| [custom_login](Plugin-Hook-API-Ref.md#custom_login) | [custom_logout_message](Plugin-Hook-API-Ref.md#custom_logout_message) | [custom_password](Plugin-Hook-API-Ref.md#custom_password) |
| [custom_version_info](Plugin-Hook-API-Ref.md#custom_version_info) | [data_input_sql_where](Plugin-Hook-API-Ref.md#data_input_sql_where) | [data_source_action_array](Plugin-Hook-API-Ref.md#data_source_action_array) |
| [data_source_action_bottom](Plugin-Hook-API-Ref.md#data_source_action_bottom) | [data_source_action_execute](Plugin-Hook-API-Ref.md#data_source_action_execute) | [data_source_action_prepare](Plugin-Hook-API-Ref.md#data_source_action_prepare) |
| [data_source_edit_bottom](Plugin-Hook-API-Ref.md#data_source_edit_bottom) | [data_source_edit_top](Plugin-Hook-API-Ref.md#data_source_edit_top) | [data_source_remove](Plugin-Hook-API-Ref.md#data_source_remove) |
| [data_source_to_poller_items](Plugin-Hook-API-Ref.md#data_source_to_poller_items) | [data_sources_table](Plugin-Hook-API-Ref.md#data_sources_table) | [device_action_array](Plugin-Hook-API-Ref.md#device_action_array) |
| [device_action_bottom](Plugin-Hook-API-Ref.md#device_action_bottom) | [device_action_execute](Plugin-Hook-API-Ref.md#device_action_execute) | [device_action_prepare](Plugin-Hook-API-Ref.md#device_action_prepare) |
| [device_display_text](Plugin-Hook-API-Ref.md#device_display_text) | [device_edit_pre_bottom](Plugin-Hook-API-Ref.md#device_edit_pre_bottom) | [device_edit_top_links](Plugin-Hook-API-Ref.md#device_edit_top_links) |
| [device_filter_end](Plugin-Hook-API-Ref.md#device_filter_end) | [device_filter_start](Plugin-Hook-API-Ref.md#device_filter_start) | [device_filters](Plugin-Hook-API-Ref.md#device_filters) |
| [device_remove](Plugin-Hook-API-Ref.md#device_remove) | [device_sql_where](Plugin-Hook-API-Ref.md#device_sql_where) | [device_table_bottom](Plugin-Hook-API-Ref.md#device_table_bottom) |
| [device_table_replace](Plugin-Hook-API-Ref.md#device_table_replace) | [device_template_change](Plugin-Hook-API-Ref.md#device_template_change) | [device_template_edit](Plugin-Hook-API-Ref.md#device_template_edit) |
| [device_template_top](Plugin-Hook-API-Ref.md#device_template_top) | [draw_navigation_text](Plugin-Hook-API-Ref.md#draw_navigation_text) | [export_action](Plugin-Hook-API-Ref.md#export_action) |
| [fgc_contextoption](Plugin-Hook-API-Ref.md#fgc_contextoption) | [get_friendly_name](Plugin-Hook-API-Ref.md#get_friendly_name) | [global_settings_update](Plugin-Hook-API-Ref.md#global_settings_update) |
| [graph](Plugin-Hook-API-Ref.md#graph) | [graph_buttons](Plugin-Hook-API-Ref.md#graph_buttons) | [graph_edit_after](Plugin-Hook-API-Ref.md#graph_edit_after) |
| [graph_image](Plugin-Hook-API-Ref.md#graph_image) | [graph_items_remove](Plugin-Hook-API-Ref.md#graph_items_remove) | [graph_tree_page_buttons](Plugin-Hook-API-Ref.md#graph_tree_page_buttons) |
| [graphs_action_array](Plugin-Hook-API-Ref.md#graphs_action_array) | [graphs_action_bottom](Plugin-Hook-API-Ref.md#graphs_action_bottom) | [graphs_action_execute](Plugin-Hook-API-Ref.md#graphs_action_execute) |
| [graphs_action_prepare](Plugin-Hook-API-Ref.md#graphs_action_prepare) | [graphs_item_array](Plugin-Hook-API-Ref.md#graphs_item_array) | [graphs_new_top_links](Plugin-Hook-API-Ref.md#graphs_new_top_links) |
| [graphs_remove](Plugin-Hook-API-Ref.md#graphs_remove) | [graphs_sql_where](Plugin-Hook-API-Ref.md#graphs_sql_where) | [hmib_get_cpu](Plugin-Hook-API-Ref.md#hmib_get_cpu) |
| [hmib_get_cpu_indexes](Plugin-Hook-API-Ref.md#hmib_get_cpu_indexes) | [hmib_get_disk](Plugin-Hook-API-Ref.md#hmib_get_disk) | [host_edit_bottom](Plugin-Hook-API-Ref.md#host_edit_bottom) |
| [host_edit_top](Plugin-Hook-API-Ref.md#host_edit_top) | [host_save](Plugin-Hook-API-Ref.md#host_save) | [import_action](Plugin-Hook-API-Ref.md#import_action) |
| [is_console_page](Plugin-Hook-API-Ref.md#is_console_page) | [login_after](Plugin-Hook-API-Ref.md#login_after) | [login_before](Plugin-Hook-API-Ref.md#login_before) |
| [login_options_navigate](Plugin-Hook-API-Ref.md#login_options_navigate) | [login_process](Plugin-Hook-API-Ref.md#login_process) | [login_realms](Plugin-Hook-API-Ref.md#login_realms) |
| [login_title](Plugin-Hook-API-Ref.md#login_title) | [logout_post_session_destroy](Plugin-Hook-API-Ref.md#logout_post_session_destroy) | [logout_pre_session_destroy](Plugin-Hook-API-Ref.md#logout_pre_session_destroy) |
| [nav_login_after](Plugin-Hook-API-Ref.md#nav_login_after) | [nav_login_before](Plugin-Hook-API-Ref.md#nav_login_before) | [page_bottom](Plugin-Hook-API-Ref.md#page_bottom) |
| [page_buttons](Plugin-Hook-API-Ref.md#page_buttons) | [page_head](Plugin-Hook-API-Ref.md#page_head) | [page_title](Plugin-Hook-API-Ref.md#page_title) |
| [poller_bottom](Plugin-Hook-API-Ref.md#poller_bottom) | [poller_command_args](Plugin-Hook-API-Ref.md#poller_command_args) | [poller_exiting](Plugin-Hook-API-Ref.md#poller_exiting) |
| [poller_finishing](Plugin-Hook-API-Ref.md#poller_finishing) | [poller_output](Plugin-Hook-API-Ref.md#poller_output) | [poller_remote_maint](Plugin-Hook-API-Ref.md#poller_remote_maint) |
| [poller_top](Plugin-Hook-API-Ref.md#poller_top) | [remote_agent](Plugin-Hook-API-Ref.md#remote_agent) | [replicate_in](Plugin-Hook-API-Ref.md#replicate_in) |
| [replicate_out](Plugin-Hook-API-Ref.md#replicate_out) | report_filters | [resolve_dependencies](Plugin-Hook-API-Ref.md#resolve_dependencies) |
| [rrd_graph_graph_options](Plugin-Hook-API-Ref.md#rrd_graph_graph_options) | [run_data_query](Plugin-Hook-API-Ref.md#run_data_query) | [snmpagent_cache_install](Plugin-Hook-API-Ref.md#snmpagent_cache_install) |
| [substitute_host_data](Plugin-Hook-API-Ref.md#substitute_host_data) | [top_graph_header](Plugin-Hook-API-Ref.md#top_graph_header) | [top_graph_header_tabs](Plugin-Hook-API-Ref.md#top_graph_header_tabs) |
| [top_graph_jquery_function](Plugin-Hook-API-Ref.md#top_graph_jquery_function) | [top_graph_refresh](Plugin-Hook-API-Ref.md#top_graph_refresh) | [top_header](Plugin-Hook-API-Ref.md#top_header) |
| [tree_after](Plugin-Hook-API-Ref.md#tree_after) | [tree_view_page_end](Plugin-Hook-API-Ref.md#tree_view_page_end) | [ugroup_tabs](Plugin-Hook-API-Ref.md#ugroup_tabs) |
| [update_data_source_title_cache](Plugin-Hook-API-Ref.md#update_data_source_title_cache) | [user_admin_action](Plugin-Hook-API-Ref.md#user_admin_action) | [user_admin_edit](Plugin-Hook-API-Ref.md#user_admin_edit) |
| [user_admin_run_action](Plugin-Hook-API-Ref.md#user_admin_run_action) | [user_admin_setup_sql_save](Plugin-Hook-API-Ref.md#user_admin_setup_sql_save) | [user_admin_tab](Plugin-Hook-API-Ref.md#user_admin_tab) |
| [user_admin_user_save](Plugin-Hook-API-Ref.md#user_admin_user_save) | [user_group_admin_action](Plugin-Hook-API-Ref.md#user_group_admin_action) | [user_group_admin_edit](Plugin-Hook-API-Ref.md#user_group_admin_edit) |
| [user_group_admin_save](Plugin-Hook-API-Ref.md#user_group_admin_save) | [user_group_admin_setup_sql_save](Plugin-Hook-API-Ref.md#user_group_admin_setup_sql_save) | [user_group_admin_run_action] (Plugin-Hook-API-Ref.md#user_group_admin_run_action) |
| [user_group_admin_tab] (Plugin-Hook-API-Ref.md#user_group_admin_tab) | [user_group_remove] (Plugin-Hook-API-Ref.md#user_group_remove) | [user_remove](Plugin-Hook-API-Ref.md#user_remove) |
| [utilities_action](Plugin-Hook-API-Ref.md#utilities_action) | [utilities_array](Plugin-Hook-API-Ref.md#utilities_array) | [utilities_list](Plugin-Hook-API-Ref.md#utilities_list) |
| [valid_host_fields](Plugin-Hook-API-Ref.md#valid_host_fields) |
| hook | hook | hook |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [add_graph_template_to_host](Plugin-Hook-API-Ref.md#add_graph_template_to_host) | [admin_alert](Plugin-Hook-API-Ref.md#admin_alert) | [api_device_new](Plugin-Hook-API-Ref.md#api_device_new) |
| [api_device_save](Plugin-Hook-API-Ref.md#api_device_save) | [auth_alternate_realms](Plugin-Hook-API-Ref.md#auth_alternate_realms) | [auth_profile_reset](Plugin-Hook-API-Ref.md#auth_profile_reset) |
| [auth_profile_reset_value](Plugin-Hook-API-Ref.md#auth_profile_reset_value) | [auth_profile_run_action](Plugin-Hook-API-Ref.md#auth_profile_run_action) | [auth_profile_save](Plugin-Hook-API-Ref.md#auth_profile_save) |
| [auth_profile_tabs](Plugin-Hook-API-Ref.md#auth_profile_tabs) | [auth_profile_update_data](Plugin-Hook-API-Ref.md#auth_profile_update_data) | [boost_poller_bottom](Plugin-Hook-API-Ref.md#boost_poller_bottom) |
| [bottom_footer](Plugin-Hook-API-Ref.md#bottom_footer) | [cacti_stats_update](Plugin-Hook-API-Ref.md#cacti_stats_update) | [change_password_title](Plugin-Hook-API-Ref.md#change_password_title) |
| [clog_regex_array](Plugin-Hook-API-Ref.md#clog_regex_array) | [config_arrays](Plugin-Hook-API-Ref.md#config_arrays) | [config_form](Plugin-Hook-API-Ref.md#config_form) |
| [config_insert](Plugin-Hook-API-Ref.md#config_insert) | [config_settings](Plugin-Hook-API-Ref.md#config_settings) | [console_after](Plugin-Hook-API-Ref.md#console_after) |
| [console_before](Plugin-Hook-API-Ref.md#console_before) | [copy_user](Plugin-Hook-API-Ref.md#copy_user) | [create_complete_graph_from_template](Plugin-Hook-API-Ref.md#create_complete_graph_from_template) |
| [custom_denied](Plugin-Hook-API-Ref.md#custom_denied) | [custom_login](Plugin-Hook-API-Ref.md#custom_login) | [custom_logout_message](Plugin-Hook-API-Ref.md#custom_logout_message) |
| [custom_password](Plugin-Hook-API-Ref.md#custom_password) | [custom_version_info](Plugin-Hook-API-Ref.md#custom_version_info) | [customize_graph](Plugin-Hook-API-Ref.md#customize_graph) |
| [customize_template_details](Plugin-Hook-API-Ref.md#customize_template_details) | [data_input_sql_where](Plugin-Hook-API-Ref.md#data_input_sql_where) | [data_source_action_array](Plugin-Hook-API-Ref.md#data_source_action_array) |
| [data_source_action_bottom](Plugin-Hook-API-Ref.md#data_source_action_bottom) | [data_source_action_execute](Plugin-Hook-API-Ref.md#data_source_action_execute) | [data_source_action_prepare](Plugin-Hook-API-Ref.md#data_source_action_prepare) |
| [data_source_edit_bottom](Plugin-Hook-API-Ref.md#data_source_edit_bottom) | [data_source_edit_top](Plugin-Hook-API-Ref.md#data_source_edit_top) | [data_source_remove](Plugin-Hook-API-Ref.md#data_source_remove) |
| [data_source_to_poller_items](Plugin-Hook-API-Ref.md#data_source_to_poller_items) | [data_sources_table](Plugin-Hook-API-Ref.md#data_sources_table) | [device_action_array](Plugin-Hook-API-Ref.md#device_action_array) |
| [device_action_bottom](Plugin-Hook-API-Ref.md#device_action_bottom) | [device_action_execute](Plugin-Hook-API-Ref.md#device_action_execute) | [device_action_prepare](Plugin-Hook-API-Ref.md#device_action_prepare) |
| [device_change_javascript](Plugin-Hook-API-Ref.md#device_change_javascript) | [device_display_text](Plugin-Hook-API-Ref.md#device_display_text) | [device_edit_pre_bottom](Plugin-Hook-API-Ref.md#device_edit_pre_bottom) |
| [device_edit_top_links](Plugin-Hook-API-Ref.md#device_edit_top_links) | [device_filter_end](Plugin-Hook-API-Ref.md#device_filter_end) | [device_filter_start](Plugin-Hook-API-Ref.md#device_filter_start) |
| [device_filters](Plugin-Hook-API-Ref.md#device_filters) | [device_remove](Plugin-Hook-API-Ref.md#device_remove) | [device_sql_where](Plugin-Hook-API-Ref.md#device_sql_where) |
| [device_table_bottom](Plugin-Hook-API-Ref.md#device_table_bottom) | [device_table_replace](Plugin-Hook-API-Ref.md#device_table_replace) | [device_template_change](Plugin-Hook-API-Ref.md#device_template_change) |
| [device_template_edit](Plugin-Hook-API-Ref.md#device_template_edit) | [device_template_top](Plugin-Hook-API-Ref.md#device_template_top) | [device_top](Plugin-Hook-API-Ref.md#device_top) |
| [draw_navigation_text](Plugin-Hook-API-Ref.md#draw_navigation_text) | [expand_title](Plugin-Hook-API-Ref.md#expand_title) | [export_action](Plugin-Hook-API-Ref.md#export_action) |
| [fgc_contextoption](Plugin-Hook-API-Ref.md#fgc_contextoption) | [get_friendly_name](Plugin-Hook-API-Ref.md#get_friendly_name) | [get_template_account](Plugin-Hook-API-Ref.md#get_template_account) |
| [global_settings_update](Plugin-Hook-API-Ref.md#global_settings_update) | [graph](Plugin-Hook-API-Ref.md#graph) | [graph_buttons](Plugin-Hook-API-Ref.md#graph_buttons) |
| [graph_buttons_thumbnails](Plugin-Hook-API-Ref.md#graph_buttons_thumbnails) | [graph_edit_after](Plugin-Hook-API-Ref.md#graph_edit_after) | [graph_image](Plugin-Hook-API-Ref.md#graph_image) |
| [graph_items_remove](Plugin-Hook-API-Ref.md#graph_items_remove) | [graph_tree_page_buttons](Plugin-Hook-API-Ref.md#graph_tree_page_buttons) | [graphs_action_array](Plugin-Hook-API-Ref.md#graphs_action_array) |
| [graphs_action_bottom](Plugin-Hook-API-Ref.md#graphs_action_bottom) | [graphs_action_execute](Plugin-Hook-API-Ref.md#graphs_action_execute) | [graphs_action_prepare](Plugin-Hook-API-Ref.md#graphs_action_prepare) |
| [graphs_item_array](Plugin-Hook-API-Ref.md#graphs_item_array) | [graphs_new_top_links](Plugin-Hook-API-Ref.md#graphs_new_top_links) | [graphs_remove](Plugin-Hook-API-Ref.md#graphs_remove) |
| [graphs_sql_where](Plugin-Hook-API-Ref.md#graphs_sql_where) | [help_page](Plugin-Hook-API-Ref.md#help_page) | [hmib_get_cpu](Plugin-Hook-API-Ref.md#hmib_get_cpu) |
| [hmib_get_cpu_indexes](Plugin-Hook-API-Ref.md#hmib_get_cpu_indexes) | [hmib_get_disk](Plugin-Hook-API-Ref.md#hmib_get_disk) | [host_edit_bottom](Plugin-Hook-API-Ref.md#host_edit_bottom) |
| [host_edit_top](Plugin-Hook-API-Ref.md#host_edit_top) | [host_save](Plugin-Hook-API-Ref.md#host_save) | [import_action](Plugin-Hook-API-Ref.md#import_action) |
| [is_console_page](Plugin-Hook-API-Ref.md#is_console_page) | [login_after](Plugin-Hook-API-Ref.md#login_after) | [login_before](Plugin-Hook-API-Ref.md#login_before) |
| [login_options_navigate](Plugin-Hook-API-Ref.md#login_options_navigate) | [login_process](Plugin-Hook-API-Ref.md#login_process) | [login_realms](Plugin-Hook-API-Ref.md#login_realms) |
| [login_title](Plugin-Hook-API-Ref.md#login_title) | [logout_post_session_destroy](Plugin-Hook-API-Ref.md#logout_post_session_destroy) | [logout_pre_session_destroy](Plugin-Hook-API-Ref.md#logout_pre_session_destroy) |
| [nav_login_after](Plugin-Hook-API-Ref.md#nav_login_after) | [nav_login_before](Plugin-Hook-API-Ref.md#nav_login_before) | [page_bottom](Plugin-Hook-API-Ref.md#page_bottom) |
| [page_buttons](Plugin-Hook-API-Ref.md#page_buttons) | [page_head](Plugin-Hook-API-Ref.md#page_head) | [page_title](Plugin-Hook-API-Ref.md#page_title) |
| [poller_bottom](Plugin-Hook-API-Ref.md#poller_bottom) | [poller_command_args](Plugin-Hook-API-Ref.md#poller_command_args) | [poller_exiting](Plugin-Hook-API-Ref.md#poller_exiting) |
| [poller_finishing](Plugin-Hook-API-Ref.md#poller_finishing) | [poller_output](Plugin-Hook-API-Ref.md#poller_output) | [poller_remote_maint](Plugin-Hook-API-Ref.md#poller_remote_maint) |
| [poller_top](Plugin-Hook-API-Ref.md#poller_top) | [remote_agent](Plugin-Hook-API-Ref.md#remote_agent) | [replicate_in](Plugin-Hook-API-Ref.md#replicate_in) |
| [replicate_out](Plugin-Hook-API-Ref.md#replicate_out) | [resolve_dependencies](Plugin-Hook-API-Ref.md#resolve_dependencies) | [rrd_graph_graph_options](Plugin-Hook-API-Ref.md#rrd_graph_graph_options) |
| [run_data_query](Plugin-Hook-API-Ref.md#run_data_query) | [settings_bottom](Plugin-Hook-API-Ref.md#settings_bottom) | [snmpagent_cache_install](Plugin-Hook-API-Ref.md#snmpagent_cache_install) |
| [substitute_host_data](Plugin-Hook-API-Ref.md#substitute_host_data) | [top_graph_header](Plugin-Hook-API-Ref.md#top_graph_header) | [top_graph_header_tabs](Plugin-Hook-API-Ref.md#top_graph_header_tabs) |
| [top_graph_jquery_function](Plugin-Hook-API-Ref.md#top_graph_jquery_function) | [top_graph_refresh](Plugin-Hook-API-Ref.md#top_graph_refresh) | [top_header](Plugin-Hook-API-Ref.md#top_header) |
| [tree_after](Plugin-Hook-API-Ref.md#tree_after) | [tree_view_page_end](Plugin-Hook-API-Ref.md#tree_view_page_end) | [ugroup_tabs](Plugin-Hook-API-Ref.md#ugroup_tabs) |
| [update_data_source_title_cache](Plugin-Hook-API-Ref.md#update_data_source_title_cache) | [user_admin_action](Plugin-Hook-API-Ref.md#user_admin_action) | [user_admin_edit](Plugin-Hook-API-Ref.md#user_admin_edit) |
| [user_admin_run_action](Plugin-Hook-API-Ref.md#user_admin_run_action) | [user_admin_setup_sql_save](Plugin-Hook-API-Ref.md#user_admin_setup_sql_save) | [user_admin_tab](Plugin-Hook-API-Ref.md#user_admin_tab) |
| [user_admin_user_save](Plugin-Hook-API-Ref.md#user_admin_user_save) | [user_group_admin_action](Plugin-Hook-API-Ref.md#user_group_admin_action) | [user_group_admin_edit](Plugin-Hook-API-Ref.md#user_group_admin_edit) |
| [user_group_admin_run_action](Plugin-Hook-API-Ref.md#user_group_admin_run_action) | [user_group_admin_save](Plugin-Hook-API-Ref.md#user_group_admin_save) | [user_group_admin_setup_sql_save](Plugin-Hook-API-Ref.md#user_group_admin_setup_sql_save) |
| [user_group_admin_tab](Plugin-Hook-API-Ref.md#user_group_admin_tab) | [user_group_remove](Plugin-Hook-API-Ref.md#user_group_remove) | [user_remove](Plugin-Hook-API-Ref.md#user_remove) |
| [utilities_action](Plugin-Hook-API-Ref.md#utilities_action) | [utilities_array](Plugin-Hook-API-Ref.md#utilities_array) | [utilities_list](Plugin-Hook-API-Ref.md#utilities_list) |
| [utilities_tab](Plugin-Hook-API-Ref.md#utilities_tab) | [valid_host_fields](Plugin-Hook-API-Ref.md#valid_host_fields) | |
## add_graph_template_to_host
@@ -65,6 +68,19 @@ host. The parameters passed are `host_id` and `graph_template_id`.
| host.php | 1.0.0 |
| lib/api_device.php | 1.0.0 |
## admin_alert
Allows a plugin to deliver an administrator alert instead of the email that
`admin_email()` would send. The hook receives an array with `contract_version`,
`status` (`unhandled`), `event_id`, `occurred_at`, `collector_id`, `subject` and
`message`. A plugin that handles the alert returns the array with `status` set
to `accepted` or `already_accepted`. Any other result, a missing handler or an
exception falls back to email.
| file | introduced | retired |
| ----------------- | :--------- | :------ |
| lib/functions.php | 1.2.32 |
## api_device_new
This hooks allows you to perform additional operation at the end of
@@ -262,7 +278,7 @@ Allows you to override the rendering of the permission denied interface.
| file | introduced | retired |
| --------------------- | :--------- | :------ |
| permission_denied.php | 1.2.2 |
| auth_login.php | 1.2.12 |
| include/auth.php | 1.2.12 |
## custom_login
@@ -297,6 +313,26 @@ page.
| ------------- | :--------- | :------ |
| utilities.php | 1.0.0 |
## customize_graph
Allows you to change the graph record of a graph that is not created from a
template (`graph_source` is `0`) before it is listed.
| file | introduced | retired |
| -------------- | :--------- | :------ |
| graph_view.php | 1.2.17 |
| graphs.php | 1.2.17 |
## customize_template_details
Allows you to change the template details of a graph that is not created from
a template (`graph_source` is `0`) before it is listed.
| file | introduced | retired |
| -------------- | :--------- | :------ |
| graph_view.php | 1.2.17 |
| graphs.php | 1.2.17 |
## data_input_sql_where
| file | introduced | retired |
@@ -413,13 +449,22 @@ actions to complete the cycle. This is were you actually save the data.
| -------- | :--------- | :------ |
| host.php | 1.0.0 |
## device_change_javascript
Allows you to add JavaScript to the device edit page, after the script that
shows and hides the device fields.
| file | introduced | retired |
| -------- | :--------- | :------ |
| host.php | 1.2.31 |
## device_display_text
This hook allows you to add custom columns header to the host list page
| file | introduced | retired |
| -------- | :---------- | :------ |
| host.php | 1.3.0 - Dev |
| host.php | 1.2.17 |
## device_edit_pre_bottom
@@ -443,7 +488,7 @@ the host list page
| file | introduced | retired |
| -------- | :---------- | :------ |
| host.php | 1.3.0 - Dev |
| host.php | 1.2.17 |
## device_filter_start
@@ -452,7 +497,7 @@ the host list page
| file | introduced | retired |
| -------- | :---------- | :------ |
| host.php | 1.3.0 - Dev |
| host.php | 1.2.17 |
## device_filters
@@ -489,16 +534,16 @@ Allows you to override the rendering of the host list page
| file | introduced | retired |
| -------- | :---------- | :------ |
| host.php | 1.3.0 - Dev |
| host.php | 1.2.17 |
## device_template_change
Allows you to add template items such a threshold upon a
device template change
| file | introduced | retired |
| ----------------- | :---------- | :------ |
| lib/ap_device.php | 1.2.25 |
| file | introduced | retired |
| ------------------ | :---------- | :------ |
| lib/api_device.php | 1.2.25 |
## device_template_edit
@@ -512,6 +557,15 @@ device template change
| ------------------ | :--------- | :------ |
| host_templates.php | 1.0.0 |
## device_top
Called near the top of host.php, after the device actions are defined and
before the requested action is run.
| file | introduced | retired |
| -------- | :--------- | :------ |
| host.php | 1.2.27 |
## draw_navigation_text
Just below the Cacti "Console", and "Graphs" tabs, cacti provides a Navigation
@@ -522,6 +576,16 @@ foolproof, this hook allows you to populate and navigate that tree.
| ----------------- | :--------- | :------ |
| lib/functions.php | 1.0.0 |
## expand_title
Allows you to change the expanded title of a data source or graph. The parameter
is an array with `host_id`, `snmp_query_id`, `snmp_index` and `title`. The
returned `title` is used.
| file | introduced | retired |
| ----------------- | :--------- | :------ |
| lib/variables.php | 1.2.3 |
## export_action
| file | introduced | retired |
@@ -540,6 +604,16 @@ foolproof, this hook allows you to populate and navigate that tree.
| -------------- | :---------- | :------ |
| lib/import.php | 1.2.0-beta1 |
## get_template_account
Allows a plugin to select the template account for a user. The parameter is the
user name or ID. If the plugin returns the value it was given, Cacti uses the
account from the `user_template` setting.
| file | introduced | retired |
| ----------------- | :--------- | :------ |
| lib/functions.php | 1.2.20 |
## global_settings_update
| file | introduced | retired |
@@ -559,9 +633,22 @@ This hook is called at the top of graph.php page
You know about the zoom button right? Well this allows you to add any additional
custom button to the right of a graph.
| file | introduced | retired |
| --------- | :--------- | :------ |
| graph.php | 1.0.0 |
| file | introduced | retired |
| ------------ | :--------- | :------ |
| graph.php | 1.0.0 |
| lib/html.php | 1.0.0 |
The hook is also fired as `graph_buttons_thumbnails`, see below.
## graph_buttons_thumbnails
Same as `graph_buttons`, but called for the drill down icons of the thumbnail
view drawn by `html_graph_thumbnail_area()`. The parameter is an array
with `hook`, `local_graph_id`, `rra`, `view_type`, `tree_id` and `branch_id`.
| file | introduced | retired |
| ------------ | :--------- | :------ |
| lib/html.php | 1.0.0 |
## graph_edit_after
@@ -660,6 +747,15 @@ used to display graphs on the graphs.php page.
| ---------- | :--------- | :------ |
| graphs.php | 1.0.0 |
## help_page
Allows you to add or change entries in the array that maps a page to its help
file.
| file | introduced | retired |
| ------------ | :--------- | :------ |
| lib/html.php | 1.2.17 |
## hmib_get_cpu
| file | introduced | retired |
@@ -738,16 +834,15 @@ Used to support alternate login realm types.
| file | introduced | retired |
| ----------------------- | :--------- | :------ |
| auth_changepassword.php | 1.0.0 |
| auth_login.php | 1.0.0 |
| lib/auth.php | 1.0.0 |
## login_process
Used to authenticate the user logging in to a custom plugin defined realm.
| file | introduced | retired |
| -------------- | :--------- | :------ |
| auth_login.php | 1.0.0 |
| file | introduced | retired |
| ------------ | :--------- | :------ |
| lib/auth.php | 1.0.0 |
## login_realms
@@ -917,7 +1012,7 @@ things like THolds fast poller for example.
| file | introduced | retired |
| -------------- | :--------- | :------ |
| lib/poller.php | 1.0.0 |
| lib/poller.php | 1.0.0 | 1.2.20 |
## replicate_out
@@ -951,6 +1046,14 @@ update was triggered.
| ------------------ | :--------- | :------ |
| lib/data_query.php | 1.0.0 |
## settings_bottom
Allows you to add output at the bottom of the Settings page.
| file | introduced | retired |
| ------------ | :--------- | :------ |
| settings.php | 1.2.25 |
## snmpagent_cache_install
| file | introduced | retired |
@@ -963,7 +1066,7 @@ This allows you to add to the substitution variables that cacti can parse.
| file | introduced | retired |
| ----------------- | :--------- | :------ |
| lib/variables.php | 1.0.0 | 1.1.5 |
| lib/variables.php | 1.0.0 |
## top_graph_header
@@ -1029,9 +1132,11 @@ page, irrespective of the leaf selection.
## ugroup_tabs
This hook was replaced by `user_group_admin_tab`.
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.0.0 |
| user_group_admin.php | 1.0.0 | 1.2.17 |
## update_data_source_title_cache
@@ -1114,6 +1219,15 @@ See the explanation on `user_admin_action`
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.0.0 |
## user_group_admin_run_action
See the explanation on `user_admin_action`. The parameter is the current tab.
When the hook returns a true value, Cacti draws the realm editor for the group.
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.2.17 |
## user_group_admin_save
See the explanation on `user_admin_action`
@@ -1122,30 +1236,30 @@ See the explanation on `user_admin_action`
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.0.0 |
## user_group_admin_action
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.0.0 |
## user_group_admin_edit
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.0.0 |
## user_group_admin_save
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.0.0 |
## user_group_admin_setup_sql_save
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.0.0 |
## user_group_admin_tab
See the explanation on `user_admin_action`. This hook replaces `ugroup_tabs`.
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.2.17 |
## user_group_remove
Allows the plugin to take part in the user group removal process. The parameter
is the ID of the removed group. Important when the plugin maintains group
settings.
| file | introduced | retired |
| -------------------- | :--------- | :------ |
| user_group_admin.php | 1.2.17 |
## user_remove
Allows the plugin to take part in the user removal process. Important when the
@@ -1154,7 +1268,7 @@ plugin maintains user settings.
| file | introduced | retired |
| -------------- | :--------- | :------ |
| lib/auth.php | 1.0.0 |
| user_admin.php | 1.0.0 |
| user_admin.php | 1.0.0 | 1.2.20 |
## utilities_action
+4 -2
View File
@@ -89,7 +89,8 @@ The MAC Address can be broken into two parts. The first part of the MAC Addess
contains the Vendor MAC. The Vendor MAC identifies who has manufactured the part.
This will be helpful to check for rogue devices on your network.
Go to Mactrack -> Tracking Utilities and click on **Refresh IEEE Vendor MAC/OUI Database**
Go to Mactrack Tools -> Tracking Utilities and click on **Refresh IEEE Vendor
MAC/OUI Database**
This option requires internet access so if for some reason your server cannot
access internet you could manually download the file from OUI Database copy it
@@ -119,7 +120,8 @@ Run scanner in debug mode for an specific device
Run php -q mactrack_scanner.php -h for more options
The scanning function you are looking for does not show up
Go to Tracking Tools Menu and click on "Refresh Scanning Functions"
Go to Mactrack Tools -> Tracking Utilities and click on "Refresh Scanning
Functions"
Deletes old and potentially stale Device Tracking scanning functions
from the drop-down you see when you edit a device type.
+1 -1
View File
@@ -95,7 +95,7 @@ can see a reference INFO file for the myplugin plugin.
```console
[info]
name = mplugin
name = myplugin
version = 1.0
longname = My First Plugin
author = Depeche Mode
+15 -25
View File
@@ -48,7 +48,7 @@ to the remotes for ease of management or each server can work independently
### Notes on upgrades
If you are upgrading to 2.0 from a prior install, you must first uninstall
syslog and ensure both the syslog, syslog_removal, and syslog_incoming tables
syslog and ensure both the syslog, syslog_remove, and syslog_incoming tables
are removed, and recreated at install time.
In addition, the rsyslog configuration has changed in 2.5. So, for example, to
@@ -130,30 +130,20 @@ SW-3750(config)#
### Mariadb/MYSQL Specific configurations
Finally, it's important, especially in more recent versions of MySQL and MariaDB
to set a correct SQL Mode. These more recent SQL's prevent certain previously
allowable syntax such as an empty data and certain group by limitations in the
SQL itself. Therefore, you need to ensure that the SQL mode of the database is
correct. To do this, first start by editing either `/etc/my.cnf` or
`/etc/my.cnf.d/server.cnf` and inserting the SQL mode variable into the database
configuration. For example:
Do not copy `sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER` from older
instructions into a current MySQL configuration, because MySQL removed
`NO_AUTO_CREATE_USER` in 8.0. Inspect the modes the database actually uses
when diagnosing a schema or migration failure:
```ini
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
```sql
SELECT @@GLOBAL.sql_mode, @@SESSION.sql_mode;
```
After this change, you should log into the mysql server and run the following
command:
```console
mysql> show global variables like 'sql_mode';
```
And ensure that it matches the setting that you placed in the database
configuration. If it does not, please search for the configuration that is
making this SQL mode other than what you required. More recent versions of
MySQL and MariaDB will source multiple database configuration files.
Follow the migration guidance for your database and plugin release rather than
changing the server-wide modes for all applications. The plugin's own upgrade
tool, `cli/upgrade_partitioning.php`, reads the session `sql_mode` and sets it
for its own session only. More recent versions of MySQL and MariaDB will
source multiple database configuration files.
## Installing the plugin
@@ -328,9 +318,9 @@ $UDPServerRun 514
$ModLoad ommysql
$template cacti_syslog,"INSERT INTO syslog_incoming(facility_id, priority_id,
program, date, time, host, message) \
values (%syslogfacility%, %syslogpriority%, '%programname%', '%timereported:::date-mysql%',
'%timereported:::date-mysql%', '%HOSTNAME%', TRIM('%msg%'))", SQL
program, logtime, host, message) \
values (%syslogfacility%, %syslogpriority%, '%programname%',
'%timegenerated:::date-mysql%', '%HOSTNAME%', TRIM('%msg%'))", SQL
*.* >localhost,my_database,my_user,my_password;cacti_syslog
```
+7 -7
View File
@@ -56,7 +56,7 @@ plugin which will not drop the SQL tables and thus save your settings.
`<path_cacti>/plugins/plugin_name`
```console
cp -R /var/www/html/cacti/plugin/thold /tmp
cp -R /var/www/html/cacti/plugins/thold /tmp
```
3. git pull or download the new version of the **Plugin**
@@ -105,17 +105,17 @@ the plugin will show to be available to be installed.
### Dependencies in plugins
Some dependencies such as THOLD aka Thresholds rely on another plugin in this
case thold reliese on the monitor plugin which is missing in this case you will
see the below message box in order to continue you must install the required
Some plugins rely on another plugin. For example, the Monitor plugin requires
the THOLD aka Thresholds plugin. If the required plugin is missing, you will
see the below message box. In order to continue you must install the required
plugin.
![plugin dependencies](images/plugins-dependencies.png)
### 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
Starting with Cacti 1.3, 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
---
+7 -7
View File
@@ -47,9 +47,9 @@ Tab stops should be set to 4 spaces.
Below are the vim rules to accomplish this:
```console
set expandtab
set noexpandtab
set shiftwidth=4
set softtabstop=4
set softtabstop=0
set tabstop=4
```
@@ -166,16 +166,16 @@ name.
```php
define('GRAPH_IMAGE_TYPE_PNG', 1);
define('GRAPH_IMAGE_TYPE_GIF', 2);
define('GRAPH_IMAGE_TYPE_SVG', 3);
```
`Data input types for data sources`
```php
define('DATA_INPUT_TYPE_NONE', 1);
define('DATA_INPUT_TYPE_DATA_QUERY', 2);
define('DATA_INPUT_TYPE_SCRIPT', 3);
define('DATA_INPUT_TYPE_SNMP', 4);
define('DATA_INPUT_TYPE_SCRIPT', 1);
define('DATA_INPUT_TYPE_SNMP', 2);
define('DATA_INPUT_TYPE_SNMP_QUERY', 3);
define('DATA_INPUT_TYPE_SCRIPT_QUERY', 4);
```
## Common Action Types
+8 -5
View File
@@ -4,7 +4,9 @@
The following are the standards to be used by Cacti Group members and
Contributes when maintaining the documentation of Cacti or any of its plugins.
These standards have also been applied to the Travis CI checker on GitHub.
The style checks are configured in `.mdlrc` and `.mdl_style.rb`. The `1.2.x`
branch has no Travis CI configuration and no workflow that runs them, so check
your changes locally.
## Reporting corrections / omissions
@@ -77,7 +79,8 @@ When creating documentation titles, they should:
_Whilst they are valid markdown, they will result in style errors._
Failure to follow this will result in an `MD001` error during Travis CI checks.
The `MD001` check is disabled in `.mdl_style.rb`, so `mdl` does not report
this, but titles should still follow the rule.
###### Example 1. Incorrect Markdown for Title Levels
@@ -370,9 +373,9 @@ cd <cacti_docs>
bin/check_markdown_style.sh
```
Which will generate the same output that is seen on the Travis CI build status.
You should ensure that any reported errors are corrected before submitting your
pull request.
Which will check the files using the style in `.mdl_style.rb`. You should
ensure that any reported errors are corrected before submitting your pull
request.
```console
Documentation-Standards.md:221: MD031 Fenced code blocks should be surrounded by blank lines
+1 -2
View File
@@ -98,11 +98,10 @@ include/graph_arrays.php
themes/[theme]/ # Visual theme files
vendor/
csrf/ # CSRF Magic
flag-icon-css/ # Flag Icons
flag-icons/ # Flag Icons
phpgettext/ # PHP GetText Library
phpmailer/ # PHP Mailer Library
phpseclib/ # PHP Security Library
phpsnmp/ # PHP Snmp Library
```
```console
+1 -1
View File
@@ -93,7 +93,7 @@ If the main file is a web-based page, it should include `include/auth.php` to
ensure that the current user is authenticated.
If the main file is a CLI-based program to be run by end users, it should
include `lib/cli_check.php` and support `-h` and `-v` parameters which run
include `include/cli_check.php` and support `-h` and `-v` parameters which run
`display_help()` and `display_version()` respectively.
```php
+3 -3
View File
@@ -4,7 +4,7 @@
In order to create a patch for inclusion into the cacti project, you need to
create a pull request which holds the changes to be made. Please note, it is
better if your request also includes a change to `docs/CHANGELOG` with a brief
better if your request also includes a change to `CHANGELOG` with a brief
description of your change (this is included with the distributed project).
The basic steps to creating a pull request are to fork cacti (by clicking on
@@ -138,8 +138,8 @@ you've may have noticed changes being made to the cacti (upstream) project that
are you not in your origin (forked) or local repos. If you were to commit a
pull request using your local changes, there would be quite a few differences.
You also wouldn't know if there was likely to be a conflict with your changes.
Travis CI is now running against the cacti repo so conflicts do usually show up
there if no where else.
GitHub Actions checks (see `.github/workflows`) run against the cacti repo so
conflicts do usually show up there if no where else.
In order to get these latest changes, we must pull from the upstream (cacti)
repo and commit these to our local repo.
+3 -3
View File
@@ -34,7 +34,7 @@ attacks from the Cacti website. Examples include:
// Example prepared statements
$hostname = db_fetch_cell_prepared('SELECT hostname FROM host WHERE id = ?', array($id));
$host = db_fetch_row_prepared('SELECT * FROM host WHERE id = ?', array($id));
$graphs = db_fetch_assoc('SELECT * FROM graph_local WHERE host_id = ?', array($id));
$graphs = db_fetch_assoc_prepared('SELECT * FROM graph_local WHERE host_id = ?', array($id));
db_execute_prepared('UPDATE host SET description = ? WHERE id = ?', array('Local Machines', $id));
@@ -122,7 +122,7 @@ $templates = db_fetch_assoc_prepared('SELECT DISTINCT gt.id, gt.name
```php
$user_realms = db_fetch_assoc('SELECT ua.id, uar.realm_id
FROM user_auth ua, user_auth_realms uar
FROM user_auth ua, user_auth_realm uar
WHERE ua.id = uar.user_id');
```
@@ -131,7 +131,7 @@ $user_realms = db_fetch_assoc('SELECT ua.id, uar.realm_id
```php
$user_realms = db_fetch_assoc('SELECT ua.id, uar.realm_id
FROM user_auth ua
INNER JOIN user_auth_realms uar
INNER JOIN user_auth_realm uar
ON ua.id = uar.user_id');
```