Fix MD formatting issues on Multiple documents (#177)

Co-authored-by: Mark Brugnoli-Vinten <netniv@hotmail.com>
Co-authored-by: Sean Mancini <sean@seanmancini.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
This commit is contained in:
authored and GitHub committed 2023-07-23 22:35:57 +01:00
1 parent 5b637afcf2
commit 5973e4ea3a
114 files changed
+3943 -5481

No files matched your search

+53 -49
View File
@@ -2,26 +2,25 @@
## Aggregate Overview
**Aggregate Templates** are a special form of a **Graph Template**. They
allow you to easily create **Graphs** that combine data from multiple common
**Aggregate Templates** are a special form of a **Graph Template**. They allow
you to easily create **Graphs** that combine data from multiple common
**Graphs** from multiple **Devices**, and allow you to easily manage the
resulting **Aggregate Graphs** to add and remove elements from other
common **Graphs**.
resulting **Aggregate Graphs** to add and remove elements from other common
**Graphs**.
To create **Aggregate Graphs** that are managed through a Template, you first
must create the **Aggregate Template**. Then from the Cacti
**Graphs** page, you can select the **Graphs** that you want used as part of
the **Aggregate**. You then select `Create Aggregate from Template` from the
Cacti Actions drop-down.
must create the **Aggregate Template**. Then from the Cacti **Graphs** page, you
can select the **Graphs** that you want used as part of the **Aggregate**. You
then select `Create Aggregate from Template` from the Cacti Actions drop-down.
Once you have created your **Aggregate Graphs**, they behave like any other
Cacti Graph. They can be a part of a Tree, zoomed, etc. They have an added
Cacti Graph. They can be a part of a Tree, zoomed, etc. They have an added
bonus - you can add and remove **Graphs** from aggregate in a very controlled
way, reducing the effort to maintain them during their life-cycle.
If you wish to change settings for **Graphs** managed by the
**Aggregate Template**, simply make the changes in the **Aggregate Template**,
and they will cascade to **Aggregate Graphs** managed by the Template.
If you wish to change settings for **Graphs** managed by the **Aggregate
Template**, simply make the changes in the **Aggregate Template**, and they will
cascade to **Aggregate Graphs** managed by the Template.
## Aggregate Template Interface
@@ -30,22 +29,24 @@ The images below shows an Aggregate Template for Traffic.
![Aggregate Templates](images/aggregate-templates.png)
When you edit the **Aggregate Template**, you are presented with an interface
that allows you to define the Graph Canvas as well as it's formatting.
You should experiment until you find the mechanism that works best to suite
your needs.
that allows you to define the Graph Canvas as well as it's formatting. You
should experiment until you find the mechanism that works best to suite your
needs.
The `Aggregate Template` `Prefix` setting allows you to provide a pattern to
be applied to the **Aggregate Graph** legend items. Any `host`, `query` or `input`
references can be used in the `Prefix` section in order to uniquely identify
the **Graph Item**.
The `Aggregate Template` `Prefix` setting allows you to provide a pattern to be
applied to the **Aggregate Graph** legend items. Any `host`, `query` or `input`
references can be used in the `Prefix` section in order to uniquely identify the
**Graph Item**.
There are several `Graph Types` transformations that deal with how `AREA`, `LINEX`
and `STACK` items are handled in the resulting **Aggeregate Graph**, they include:
There are several `Graph Types` transformations that deal with how `AREA`,
`LINEX` and `STACK` items are handled in the resulting **Aggeregate Graph**,
they include:
- **Keep Graph Types** - No transformation will occur. All `AREA`, `LINE`, and `STACKS`
will be unchanged.
- **Keep Type and Stack** - Which means the types will be preserved, but all data
will be stacked instead of simply LINEX it will be transformed to LINEX:STACK
- **Keep Graph Types** - No transformation will occur. All `AREA`, `LINE`, and
`STACKS` will be unchanged.
- **Keep Type and Stack** - Which means the types will be preserved, but all
data will be stacked instead of simply LINEX it will be transformed to
LINEX:STACK
- **Convert to Area/STACK Graph** - All `LINEX` will be converted to `AREA` and
stacked.
- **Convert to LINE1** - All **Graph Items** will be converted to `LINE1`
@@ -58,7 +59,7 @@ and `STACK` items are handled in the resulting **Aggeregate Graph**, they includ
- **Convert to LINE3/Stack** - All **Graph Items** will be converted to `LINE3`
and stacked.
The `Totaling` setting has multiple values. They include:
The `Totaling` setting has multiple values. They include:
- **No Totals** - There will be no Summation of Data in the Legend
- **Print All Legend Items** - Means that all Legend Items selected will be
@@ -67,46 +68,48 @@ The `Totaling` setting has multiple values. They include:
total all the Legend items into a single Legend.
The `Total Type` - Will create groupings of common elements on the **Graph**,
and reset stacking rules when a change in the common element occurs. The
options include:
and reset stacking rules when a change in the common element occurs. The options
include:
- **Total Similar Data Sources** - Means that you will Total legend items and
**Data Sources** through similar **Data Source** names, for example `traffic_out`
and `traffic_in`.
**Data Sources** through similar **Data Source** names, for example
`traffic_out` and `traffic_in`.
- **Total All Data Sources** - It means that you will sum the values for all
**Data Sources** regardless of their **Data Source** name.
When using `Total Type`, you are provided an option to additionally prefix your
legends using the `Prefix for GPRINT Totals` with a text value. The default
legends using the `Prefix for GPRINT Totals` with a text value. The default
works in most cases.
The `Reorder Type` will re-order the **Data Sources** within their respective
grouping on the Graph so that they are ordered in a common way, in alphabetic
order. The options include:
order. The options include:
- **No Reordering** - Don't make any changes in ordering.
- **Data Source, Graph** - Order by **Data Source** name and then by **Graph** name
- **Graph, Data Source** - Order by **Graph** name and then by **Data Source** name
- **Data Source, Graph** - Order by **Data Source** name and then by **Graph**
name
- **Graph, Data Source** - Order by **Graph** name and then by **Data Source**
name
- **Base Graph Order** - Focus on the **Graph** name only
![Aggregate Templates Edit General Options](images/aggregate-templates-edit1.png)
The `Graph Template Items` section allows you to either Skip or Total (aka include)
the **Graph Items** in the resulting **Aggregate Graphs**. When you think about
how a resulting **Aggregate** graph will look, there are some elements that simply
will not result in a good looking **Graph**. In those cases you will
want to remove them from the resulting **Aggregate Graphs**.
The `Graph Template Items` section allows you to either Skip or Total (aka
include) the **Graph Items** in the resulting **Aggregate Graphs**. When you
think about how a resulting **Aggregate** graph will look, there are some
elements that simply will not result in a good looking **Graph**. In those cases
you will want to remove them from the resulting **Aggregate Graphs**.
The `Color Template` option allows you to use differing Color rotations when
displaying elements on the resulting **Aggregate Graphs**. **Color Templates**
can be added and removed from the **Color Templates** menu pick
under `Console > Templates`.
displaying elements on the resulting **Aggregate Graphs**. **Color Templates**
can be added and removed from the **Color Templates** menu pick under
`Console > Templates`.
![Aggregate Templates Edit Canvas Options](images/aggregate-templates-edit2.png)
The several sections allow you to override any of the common **Graph Template**
elements from the resulting **Aggregate Graph**. We will not explain those options
here, only let you know that you can override them in your resulting
elements from the resulting **Aggregate Graph**. We will not explain those
options here, only let you know that you can override them in your resulting
**Aggregate Graph**.
![Aggregate Templates Edit Common Options](images/aggregate-templates-edit3.png)
@@ -121,10 +124,11 @@ here, only let you know that you can override them in your resulting
## Summary
There are several combinations of options that you
can use when working with an **Aggregate Template**. Some of these options will
results in horrible and unexpected outcomes, so you will have to experiment
until you come up with a desirable **Aggregate Template**.
There are several combinations of options that you can use when working with an
**Aggregate Template**. Some of these options will results in horrible and
unexpected outcomes, so you will have to experiment until you come up with a
desirable **Aggregate Template**.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+2 -1
View File
@@ -3,4 +3,5 @@
This section will describe **Aggregate Graphs** in Cacti.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+12 -10
View File
@@ -3,22 +3,23 @@
This section will describe **Automation Networks** in Cacti.
Adding a network to scan in the automation plugin is easy. On the main console
click Automation. Once on the below page click the + on the top right of the page.
click Automation. Once on the below page click the + on the top right of the
page.
![Automation Networks](images/automation-network-main.png)
You will now see the below page. If you want to scan 192.168.1.0/24, you would
enter that in the subnet range textbox then enter the subnet in CIDR format.
enter that in the subnet range textbox then enter the subnet in CIDR format.
Other important options are
Optiom | Descriptiom
--- | ---
Schedule type | How often you want to scan this subnet for devices
Discovery threads | How many proccessess to spawn during the scan
Max Runtime | to prevent the scan from running indefinitely
Automatically add to Cacti | If a device is SNMP reachable and matches a rule from this subnet the device will be added
Netbios | Attempt to resolve the hostname by netbios
| Optiom | Descriptiom |
| -------------------------- | ------------------------------------------------------------------------------------------ |
| Schedule type | How often you want to scan this subnet for devices |
| Discovery threads | How many proccessess to spawn during the scan |
| Max Runtime | to prevent the scan from running indefinitely |
| Automatically add to Cacti | If a device is SNMP reachable and matches a rule from this subnet the device will be added |
| Netbios | Attempt to resolve the hostname by netbios |
After you are done adding your network details, ensure you enable the rule and
save.
@@ -40,4 +41,5 @@ Here is the flow of the automation scan
![Automation Flow](images/automation-flow3.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+110 -112
View File
@@ -4,64 +4,67 @@
Cacti Performance Settings, formally known as `boost` are available to support
very large Cacti installations, and are required for supporting the multiple
**Data Collector** architecture that Cacti affords. Designed years ago,
Boosts intent was to reduce the the main data collectors cycle time by caching
writes to disk, and those writes would be handled by an out of band process
currently known as `poller_boost.php`. Since these Large Sites had
potentially well over one million **Data Sources**, there was previously
no way to write all that data every 5 minutes. So, the buffering helped
with maintaining a consistent run-time, and minimizing the user experience
disruption from all that blocking Disk I/O.
**Data Collector** architecture that Cacti affords.
In the modern Data Center, where we find an abundance of NVMe, Flash,
and SSD's, the impact of all that I/O has been reduced. However, Boost now
serves as a way to extend the life of your Flash media and therefore increase
the availability of your Cacti server over its lifetime.
Designed years ago, Boosts intent was to reduce the the main data collectors
cycle time by caching writes to disk, and those writes would be handled by an
out of band process currently known as `poller_boost.php`.
The Boost function in Cacti has several features that can be enabled or
disabled on demand by the Cacti Administrator. They include:
Since these Large Sites had potentially well over one million **Data Sources**,
there was previously no way to write all that data every 5 minutes. So, the
buffering helped with maintaining a consistent run-time, and minimizing the user
experience disruption from all that blocking Disk I/O.
In the modern Data Center, where we find an abundance of NVMe, Flash, and SSD's,
the impact of all that I/O has been reduced. However, Boost now serves as a way
to extend the life of your Flash media and therefore increase the availability
of your Cacti server over its lifetime.
The Boost function in Cacti has several features that can be enabled or disabled
on demand by the Cacti Administrator. They include:
- **On Demand RRD Updates** - Required in ALL multiple **Data Collector**
installs and control the mass update of RRDfiles through periodic dumping
of Cacti's Boost cache.
- **Image Caching** - caches PNG and SVG representations of the
Cacti **Graphs** to reduce the overall CPU utilization of the Cacti server
infrastructure.
installs and control the mass update of RRDfiles through periodic dumping of
Cacti's Boost cache.
- **Image Caching** - caches PNG and SVG representations of the Cacti **Graphs**
to reduce the overall CPU utilization of the Cacti server infrastructure.
## Prerequisites
In its initial design the Boost process leveraged MySQL Memory Tables to
increase overall performance, and to reduce writing data to disk. This is
still a valid case however, with improvements in InnoDB performance over the
years combined with Flash storage, the need for using MySQL Memory Tables
has diminshed. In some cases, for example when using MariaDB Galera, or
MySQL Master/Slave replication, it can not be used.
increase overall performance, and to reduce writing data to disk. This is still
a valid case however, with improvements in InnoDB performance over the years
combined with Flash storage, the need for using MySQL Memory Tables has
diminshed. In some cases, for example when using MariaDB Galera, or MySQL
Master/Slave replication, it can not be used.
If you do wish to use Memory you have to pay close attention to the
amount of data that will be cached in your design. You should periodically
check that you have sufficient memory available to cache all the data in the
Boost cache. The MySQL/MariaDB setting that controls the maximum size of a
memory table is the `max_heap_table_size` setting in your
`/etc/my.cnf.d/server.cnf` file.
If you do wish to use Memory you have to pay close attention to the amount of
data that will be cached in your design. You should periodically check that you
have sufficient memory available to cache all the data in the Boost cache. The
MySQL/MariaDB setting that controls the maximum size of a memory table is the
`max_heap_table_size` setting in your `/etc/my.cnf.d/server.cnf` file.
To change the `max_heap_table_size` setting you require a restart of
MySQL/MariaDB. So you won't want to make these changes often,
as some systems have little time between mass updates to perform a restart.
If you restart MySQL/MariaDB when the cache is full, you will lose those
updates upon restart unless you first change the ENGINE of the Boost cache
table to InnoDB or MyISAM before restarting.
MySQL/MariaDB. So you won't want to make these changes often, as some systems
have little time between mass updates to perform a restart. If you restart
MySQL/MariaDB when the cache is full, you will lose those updates upon restart
unless you first change the ENGINE of the Boost cache table to InnoDB or MyISAM
before restarting.
When using Memory Tables you have to be cognizant of the maximum output
width of the Cache table called `poller_output_boost`. By default, it's set
to 512 bytes, which allows for very wide output from your **Data Collectors**.
MySQL Memory Tables do not allow for variable sized columns in memory -
which means if you write one byte to it, it will take 512 bytes. So, tuning
this width is very important. That will be explained in more detail later on
in this chapter.
When using Memory Tables you have to be cognizant of the maximum output width of
the Cache table called `poller_output_boost`. By default, it's set to 512 bytes,
which allows for very wide output from your **Data Collectors**. MySQL Memory
Tables do not allow for variable sized columns in memory - which means if you
write one byte to it, it will take 512 bytes. So, tuning this width is very
important. That will be explained in more detail later on in this chapter.
## Checking how your system is configured
To see how your system is configured, you can goto
`Console > Utilityes > System Utilities > View Boost Status` option, when you
go there, you will see an image similar to that below.
`Console > Utilityes > System Utilities > View Boost Status` option, when you go
there, you will see an image similar to that below.
![Boost Status Screen](images/boost-status1.png)
From this image, we can tell a few things:
@@ -76,126 +79,121 @@ Additionally, you can tell
- The average 'Bytes/Record' is 62
- We have unlimited Records that can be stored there
From that Data, we know if we were to use a Memory Table, at present
it's width could be say 100 Bytes and we could cut memory use by 80%.
From that Data, we know if we were to use a Memory Table, at present it's width
could be say 100 Bytes and we could cut memory use by 80%.
We can also estimate from this interface, how large our `max_heap_table_size`
would ultimately have to be, keeping in mind that the
`Current Boost Table Size` is misleading since even though each record
can be in excess of 512 bytes, it's presently only using 62 bytes of
total storage per record.
![Boost Status Screen](images/boost-status1.png)
would ultimately have to be, keeping in mind that the `Current Boost Table Size`
is misleading since even though each record can be in excess of 512 bytes, it's
presently only using 62 bytes of total storage per record.
In the image below, you can see runtime statistics, update frequencies, and
Image Caching settings, which are currently disabled.
From this setup, you can see that mass RRDfile updates are only
happening roughly every 6 hours to minimize wear and tear on the SSD
storage in use.
![Boost Status Screen](images/boost-status2.png)
From this setup, you can see that mass RRDfile updates are only happening
roughly every 6 hours to minimize wear and tear on the SSD storage in use.
## Enabling Boost
To find and Enable the Boost settings, you first go to
`Console > Configuration > Settings > Performance`.
From this interface, in the image below, you can setup Boost.
`Console > Configuration > Settings > Performance`. From this interface, in the
image below, you can setup Boost.
![Boost Settings Screen](images/boost-settings.png)
As an exercise, lets look at a fictitious setup and determine what
the `max_heap_table_size` should be. Let's say, for example, that your
Cacti systems **Poller Cache** contains 200k rows, and the maximum length
of any rows output is 20 bytes, about the size of a 64bit counter value.
As an exercise, lets look at a fictitious setup and determine what the
`max_heap_table_size` should be. Let's say, for example, that your Cacti systems
**Poller Cache** contains 200k rows, and the maximum length of any rows output
is 20 bytes, about the size of a 64bit counter value.
If you are running scripts, ones that return very long results,
like the MySQL statistics plugin, you should consider carefully the
next step.
If you are running scripts, ones that return very long results, like the MySQL
statistics plugin, you should consider carefully the next step.
In this case, we will assume that even though the largest value returned
is 20 bytes, we will elect to maintain a maximum output column
width of 50 bytes.
In this case, we will assume that even though the largest value returned is 20
bytes, we will elect to maintain a maximum output column width of 50 bytes.
The important thing here is that memory tables store the full size of
the column, even though the column type is `varchar()`. By default it's
`varchar(512)`. Therefore, if your system only needs 50 bytes, you will
have 90% waste in your `poller_output_boost` table.
The important thing here is that memory tables store the full size of the
column, even though the column type is `varchar()`. By default it's
`varchar(512)`. Therefore, if your system only needs 50 bytes, you will have 90%
waste in your `poller_output_boost` table.
The next step would me to modify the structure of your `poller_output`
and `poller_output_boost` tables. You would do this by doing the following:
The next step would me to modify the structure of your `poller_output` and
`poller_output_boost` tables. You would do this by doing the following:
```sql
ALTER TABLE poller_output,
MODIFY column output varchar(50) NOT NULL default ""
ENGINE=memory;
MODIFY column output varchar(50) NOT NULL default ""
ENGINE=memory;
ALTER TABLE poller_output_boost,
MODIFY column output varchar(50) NOT NULL default ""
ENGINE=memory;
MODIFY column output varchar(50) NOT NULL default ""
ENGINE=memory;
```
As previously mentioned, its also important that the `poller_output` table
is converted to memory, eliminate any disk I/O related to poller updates.
As previously mentioned, its also important that the `poller_output` table is
converted to memory, eliminate any disk I/O related to poller updates.
Now, you need to determine how many polling cycles will fit into your
`poller_output_boost` table. In this case, when sizing the `poller_output_boost`
table, you take the output column width and add 34 bytes per record.
So, in this case, each data source result to be stored in the
`poller_output_boost` table would take 84bytes.
table, you take the output column width and add 34 bytes per record. So, in this
case, each data source result to be stored in the `poller_output_boost` table
would take 84bytes.
Then, with the Maximum Heap Table size in hand, and let's say the
default is 16MBytes for the largest table (the MySQL default), you can
calculate the number of poller intervals that you can store without
running out of MySQL memory. So, let's take our example:
Then, with the Maximum Heap Table size in hand, and let's say the default is
16MBytes for the largest table (the MySQL default), you can calculate the number
of poller intervals that you can store without running out of MySQL memory. So,
let's take our example:
```console
200k Cache Entries x 84 Bytes Per Poller Cache Row = 1,680,000 Bytes per Poll
```
This means that your `poller_output_boost` can handle 10 Cacti polling cycles,
or roughly 4/5 of an hour of poller data before it must be cleared by the system.
or roughly 4/5 of an hour of poller data before it must be cleared by the
system.
As all things go, you should not want to take your system to the edge.
So, it is best to increase the `max_heap_table_size` of your system to ensure
you have buffer in cases where say for example, your disks become degraded over
time and the Boost cycle is extended as a result.
As all things go, you should not want to take your system to the edge. So, it is
best to increase the `max_heap_table_size` of your system to ensure you have
buffer in cases where say for example, your disks become degraded over time and
the Boost cycle is extended as a result.
But let's look at the problem a different way. Let's say that you wish to
perform major updates every 4 hours. With a 50% memory reserve, we should
plan for 6 hours of updates. This way, we need to have size for 72 poller
cycles in your `poller_output_boost` table. This means that the
`max_heap_table_size` must be at least 131,040,000 Bytes.
perform major updates every 4 hours. With a 50% memory reserve, we should plan
for 6 hours of updates. This way, we need to have size for 72 poller cycles in
your `poller_output_boost` table. This means that the `max_heap_table_size` must
be at least 131,040,000 Bytes.
So, let's call it a deal. Provided you have enough memory, and I expect
that you do, you would edit the /etc/my.cnf.d/server.cnf and add/modify
the following line:
So, let's call it a deal. Provided you have enough memory, and I expect that you
do, you would edit the /etc/my.cnf.d/server.cnf and add/modify the following
line:
```console
max_heap_table_size=132M
```
Then, save the file, and restart MySQL. Once this is done, you are ready
to “enable” Boost as described above.
Then, save the file, and restart MySQL. Once this is done, you are ready to
“enable” Boost as described above.
## Flushing the Boost Cache
If you are planning on system maintenance if you are using MEMORY storage
in MySQL or MariaDB, you should flush your Boost Cache before your system
is taken offline for maintenance. To do this, you simply login to the
Cacti system as root, and flush the Cache using the commands below
If you are planning on system maintenance if you are using MEMORY storage in
MySQL or MariaDB, you should flush your Boost Cache before your system is taken
offline for maintenance. To do this, you simply login to the Cacti system as
root, and flush the Cache using the commands below
```console
cd /var/www/html/cacti
php -q poller_boost.php --force
```
This operation will take several minutes to complete, at which time there
will be additional records in the `poller_output_boost` table. So, it
might be better that after the `poller_boost.php` process is complete,
to modify the `poller_output_boost` table to InnoDB before reboot,
and then convert it back to memory after they system maintenance is
complete.
This operation will take several minutes to complete, at which time there will
be additional records in the `poller_output_boost` table. So, it might be better
that after the `poller_boost.php` process is complete, to modify the
`poller_output_boost` table to InnoDB before reboot, and then convert it back to
memory after they system maintenance is complete.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -93,4 +93,4 @@ and examples of their use. Cacti supports all of them, if you find one that is
supported, open an [Issue on Github](https://github.com/Cacti/cacti/issues).
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+30 -27
View File
@@ -3,20 +3,20 @@
## Summary
The Cacti Log is where all Cacti statistics, warnings, errors and other log messages
are sent to. Cacti can optionally log some information to your syslog or event log
are sent to. Cacti can optionally log some information to your syslog or event log
depending on your OS type.
The Cacti Log is by default ordered from newest event to oldest event, and the Cacti Log
is rotated by Cacti itself once a day.
The Cacti Log is by default ordered from newest event to oldest event, a
nd the Cacti Log is rotated by Cacti itself once a day.
If you have the User Level permission, you can view any available Cacti Stadard Output or
Standard Error log. If you have the Administrative level access, you may additionally purge
information from the logs.
If you have the User Level permission, you can view any available Cacti Stadard
Output or Standard Error log. If you have the Administrative level access,
you may additionally purge information from the logs.
As a Cacti Administrator, you have the ability to filter out some message types from users
for example, one message type that people like to filter out is "AUTH" messages that tell
you who is logging into the Cacti Web Site. You can edit these removal rules from the
Cacti Settings page.
As a Cacti Administrator, you have the ability to filter out some message types
from users for example, one message type that people like to filter out is
"AUTH" messages that tell you who is logging into the Cacti Web Site.
You can edit these removal rules from the Cacti Settings page.
An image of the Cacti Log file can be seen below.
@@ -24,14 +24,15 @@ An image of the Cacti Log file can be seen below.
## Cacti Log Filters
What we like to see in the Cacti Log is a lot of Green, which means good. By default,
WARNINGS are yellow, and ERRORS are red. But there are other types of messages that highlight
differently. Generally, you can filter for these message types. The filters include:
What we like to see in the Cacti Log is a lot of Green, which means good. By default,
WARNINGS are yellow, and ERRORS are red. But there are other types of messages
that highlight differently. Generally, you can filter for these message types.
The filters include:
- **File** - The Cacti Log file to view. They are suffixed by a data when they were rotated
- **File** - The Cacti Log file to view. They are suffixed by a data when they were rotated
using the following pattern: YYYY-MM-DD.
- **Tail Lines** - The number of lines to view from the selected Cacti Log.
- **Types** - The message types to view. These will be explained below.
- **Types** - The message types to view. These will be explained below.
- **Display Order** - The order to display the Log lines, either *Newest First* or *Oldest First*.
- **Refresh** - How often to Auto-refresh the interface.
- **Search** - A perl compatible Regular Expression to search the log with.
@@ -41,26 +42,28 @@ The Cacti Log **Types** include the following:
- **Stats** - Anything that includes the word **STATS**
- **Warnings** - Anything that includes the word **WARNING**
- **Warnings++** - Anything of each **WARNING**, **ERROR**, **DEBUG**, and **SQL**
this one is good for debugging, and it will include most important errors to the Cacti
Administrator.
this one is good for debugging, and it will include most important
errors to the Cacti Administrator.
- **Errors** - Anything that includes the word **ERROR**
- **Errors++** - Anything of each **ERROR**, **DEBUG**, and **SQL**
- **Debug** - Anything that includes the word **DEBUG**
- **AutoM8** - Anything that includes the word **AUTOM8**. These message come from Cacti
automation of Devices, Graphs, and Trees
- **Non Stats** - Anything that does not includes the world **STATS**.
- **AutoM8** - Anything that includes the word **AUTOM8**. These message come from
Cacti automation of Devices, Graphs, and Trees
- **Non Stats** - Anything that does not include the word **STATS**.
- **Boost** - Anything that contains the word **BOOST**.
- **Device Up/Down** - Any device Up/Down notification including those that come from
*Thold* or *Monitor* Plugins.
- **Device Up/Down** - Any device Up/Down notification including t
hose that come from *Thold* or *Monitor* Plugins.
- **Recaches** - Any Device Recache Events.
- **Threshold** - If the *Thold* plugins is installed, any of it's threshold breach and
restoration events.
- **Threshold** - If the *Thold* plugins is installed,
any of it's threshold breach and restoration events.
## Differences between User and Administrative Views
As previously mentioned, the Cacti log has two permission levels, the User Permission level
will not include the *Purge* button, and can have some information hidden from public view
As previously mentioned, the Cacti log has two permission levels,
the User Permission level will not include the *Purge* button,
and can have some information hidden from public view
whereas the Administrative view includes all Log messages and a *Purge** button.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+21 -18
View File
@@ -1,41 +1,44 @@
### Configuring and enabling SSL for Cacti with a self signed certificate
# Configuring and enabling SSL for Cacti with a self signed certificate
Enabling SSL for cacti is mostly done at the webserver level an example SSL configuration
for Http is as follows
Enabling SSL for Cacti is mostly done at the webserver level. An example SSL
config for Http is as follows:
```console
```bash
yum install -y mod_ssl -y
openssl genrsa -out ca.key 2048
openssl req -new -key ca.key -out ca.csr
openssl x509 -req -days 700 -in ca.csr -signkey ca.key -out ca.crt
cp ca.crt /etc/pki/tls/certs
cp ca.key /etc/pki/tls/private/ca.key
cp ca.csr /etc/pki/tls/private/ca.csr
```
Then we need to update the Apache SSL configuration file
Then we need to update the Apache SSL configuration file:
```console
```ini
vi +/SSLCertificateFile /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
```
restart the httpd service
Restart the httpd service:
```console
```bash
systemctl restart httpd
```
After you have configured the web server to accept https you can force https in the Cacti GUI
#### Warning if you are using multiple pollers ensure all pollers have HTTPS enabled or remote polling feature will not work
![cacti-ssl](images/cacti-https.PNG)
#### Note: If your Cacti system is public it is recommended to get a certificate from a trusted certificate provider
After configuring the web server to accept https, you can enable https in the
GUI
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
**Note**: if using multiple pollers, all must have HTTPS enabled for the remote polling feature to work properly.
---
**Note**: If your Cacti system is public, it is recommended to get a certificate from a trusted certificate provider.
---
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -29,4 +29,4 @@ wish to search through the list of approximately 340 legacy and *Named Colors*.
![Color Templates Item Edit](images/color-templates-edit2.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -31,4 +31,4 @@ earlier Cacti version.
![Colors Color Edit](images/colors-edit2.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+185 -185
View File
@@ -1,12 +1,13 @@
# Command Line Scripts (CLI)
Cacti supports a number of command line scripts. You will find them in the
`./cli` directory. The CLI scripts fall into multiple categories, they include:
`./cli` directory. The CLI scripts fall into multiple categories, they include:
- **Automation** - Utilities to help automate adding objects to Cacti
- **Maintenance** - Utilities to help keep Cacti healthy
- **Repair** - Utilities to help with repairing Cacti database components
- **Repair/Migration** - Utilities to help with repairing or migrating Cacti components
- **Repair/Migration** - Utilities to help with repairing or migrating Cacti
components
- **Install/Upgrade** - Utilities to help with installing and upgrading Cacti
In the table below, each of the CLI scripts are categories and explained
@@ -14,68 +15,70 @@ briefly.
## Automation Scripts
Script | Category | Description
--- | --- | ---
add_device.php | Automation | Allows adding a Device to Cacti. Most device options are included. Some plugin options may not.
add_data_query.php | Automation | Allows adding a Data Query to Cacti.
add_graph_template.php | Automation | Allows adding a Graph Template to Cacti.
add_graphs.php | Automation | Allows adding a Graph to Cacti.
add_perms.php | Automation | Allows adding permissions to Cacti.
add_tree.php | Automation | Allows adding tree's tree branches and objects to Cacti Trees.
copy_user.php | Maintenance | Allows creating new users from Templates
| Script | Category | Description |
| ---------------------- | ----------- | ----------------------------------------------------------------------------------------------- |
| add_device.php | Automation | Allows adding a Device to Cacti. Most device options are included. Some plugin options may not. |
| add_data_query.php | Automation | Allows adding a Data Query to Cacti. |
| add_graph_template.php | Automation | Allows adding a Graph Template to Cacti. |
| add_graphs.php | Automation | Allows adding a Graph to Cacti. |
| add_perms.php | Automation | Allows adding permissions to Cacti. |
| add_tree.php | Automation | Allows adding tree's tree branches and objects to Cacti Trees. |
| copy_user.php | Maintenance | Allows creating new users from Templates |
## Maintenance Scripts
Script | Category | Description
--- | --- | ---
input_whitelist.php | Maintenance | To to onboard new Data Input Methods when using Cacti in a high security environment where new Data Input Methods must always be vetted before enabling for general use.
poller_graphs_reapply_names.php | Maintenance | Allows selecting re-running of Cacti's suggested values engine for Graphs
poller_reindex_hosts.php | Maintenance | Batch method to re-index Cacti Devices
analyze_database.php | Maintenance | Analyzes all Cacti tables rebuilding their index cardinality. Important to run after having added large numbers of Devices and Graphs to Cacti.
| Script | Category | Description |
| ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| input_whitelist.php | Maintenance | To to onboard new Data Input Methods when using Cacti in a high security environment where new Data Input Methods must always be vetted before enabling for general use. |
| poller_graphs_reapply_names.php | Maintenance | Allows selecting re-running of Cacti's suggested values engine for Graphs |
| poller_reindex_hosts.php | Maintenance | Batch method to re-index Cacti Devices |
| analyze_database.php | Maintenance | Analyzes all Cacti tables rebuilding their index cardinality. Important to run after having added large numbers of Devices and Graphs to Cacti. |
## Repair Scripts
Script | Category | Description
--- | --- | ---
poller_output_empty.php | Repair | Removes bad entries from Cacti's poller output table.
rebuild_poller_cache.php | Repair | Batch process to re-populate Cacti's poller cache. NOTE: This script can run for a very long time on large systems.
repair_database.php | Repair | Utility to look for common problems with old Cacti databases where objects were removed while still in use. Also rapairs all tables after a system crash.
repair_graphs.php | Repair | Utility to repair Cacti Graphs whose structure is damaged due to legacy Cacti behavior.
repair_templates.php | Repair | Utility to repair Cacti Templates whose structure was damaged due to legacy Cacti behavior.
| Script | Category | Description |
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| poller_output_empty.php | Repair | Removes bad entries from Cacti's poller output table. |
| rebuild_poller_cache.php | Repair | Batch process to re-populate Cacti's poller cache. NOTE: This script can run for a very long time on large systems. |
| repair_database.php | Repair | Utility to look for common problems with old Cacti databases where objects were removed while still in use. Also rapairs all tables after a system crash. |
| repair_graphs.php | Repair | Utility to repair Cacti Graphs whose structure is damaged due to legacy Cacti behavior. |
| repair_templates.php | Repair | Utility to repair Cacti Templates whose structure was damaged due to legacy Cacti behavior. |
## Repair/Migration Scripts
Script | Category | Description
--- | --- | ---
audit_database.php | Repair/Migration | Script to audit your Cacti schema, and repair any tables that don't match the stock Cacti schema. It will also upgrade the Cacti schema and run plugin upgrade functions. This is a good migration tool to move database from old versions of Cacti.
convert_tables.php | Repair/Migration | Convert all tables from their current form to the Cacti preferred table type, collation and charset
splice_rra.php | Migration | Utility that allows two RRDfiles to be merged, and also assists with resampling an old RRDfile to a new RRA configuration, for example moving a Cacti system from 5 minute polling to 1 minute polling.
| Script | Category | Description |
| ------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| audit_database.php | Repair/Migration | Script to audit your Cacti schema, and repair any tables that don't match the stock Cacti schema. It will also upgrade the Cacti schema and run plugin upgrade functions. This is a good migration tool to move database from old versions of Cacti. |
| convert_tables.php | Repair/Migration | Convert all tables from their current form to the Cacti preferred table type, collation and charset |
| splice_rra.php | Migration | Utility that allows two RRDfiles to be merged, and also assists with resampling an old RRDfile to a new RRA configuration, for example moving a Cacti system from 5 minute polling to 1 minute polling. |
## Install/Upgrade Scripts
Script | Category | Description
--- | --- | ---
import_package.php | Install/Upgrade | Import a Cacti package from a tgz file.
install_cacti.php | Install/Upgrade | Script to install Cacti from a raw schema. Used primarily by distribution maintainers.
md5sum.php | Install/Upgrade | Utility to verify the MD5SUM of a file.
sqltable_to_php.php | Install/Upgrade | Utility for Plugin Developers to create an object for creating tables in plugins.
structure_rra_paths.php | Install/Upgrade | Utility to convert a system from a flat directory path to a heirarchial one. Important for certain file systems that don't perform well when there are tens or hundreds of thousands of files in a single directory.
upgrade_database.php | Install/Upgrade | Utility to upgrade a Cacti database from a point in time to the current release. Or even rerun the database upgrade from a point in the past to catch up with changes. This script should be used in conjunction with the `audit_database.php --repair --upgrade` option.
| Script | Category | Description |
| ----------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| import_package.php | Install/Upgrade | Import a Cacti package from a tgz file. |
| install_cacti.php | Install/Upgrade | Script to install Cacti from a raw schema. Used primarily by distribution maintainers. |
| md5sum.php | Install/Upgrade | Utility to verify the MD5SUM of a file. |
| sqltable_to_php.php | Install/Upgrade | Utility for Plugin Developers to create an object for creating tables in plugins. |
| structure_rra_paths.php | Install/Upgrade | Utility to convert a system from a flat directory path to a heirarchial one. Important for certain file systems that don't perform well when there are tens or hundreds of thousands of files in a single directory. |
| upgrade_database.php | Install/Upgrade | Utility to upgrade a Cacti database from a point in time to the current release. Or even rerun the database upgrade from a point in the past to catch up with changes. This script should be used in conjunction with the `audit_database.php --repair --upgrade` option. |
> **NOTE**: Package maintainers may wish to utilize the CLI methods of install_cacti.php and
> upgrade_database.php to perform in place installations and upgrades.
> **NOTE**: Package maintainers may wish to utilize the CLI methods of
> install_cacti.php and upgrade_database.php to perform in place installations
> and upgrades.
> **Caution**: In the following examples, several numbers are shown as output from various
> scripts. They will vary between different installations. So don't bother, if
> your numbers will vary.
In the sub-sections below, we will demonstrate the use of a few of these CLI
scripts.
In the sub-sections below, we will demonstrate the use of a few of these CLI scripts.
> **Caution**: In the following examples, several numbers are shown as output
> from various scripts. They will vary between different installations. So don't
> bother, if your numbers will vary.
## Rebuild Poller Cache
The poller cache holds all commands that cacti will issue during the polling
process in an internal format. It is possible, to review the current contents
of the poller cache by visiting `System Utilities`, `View Poller Cache`. It is
process in an internal format. It is possible, to review the current contents of
the poller cache by visiting `System Utilities`, `View Poller Cache`. It is
possible to apply filters to this view; it will show up like
```console
@@ -96,8 +99,8 @@ Localhost - mtaReceivedVolume SNMP Version: 1, Community: somesecret, OID: .1.
```
There are several circumstances, that may result in the poller cache being out
of sync. An example would be a change of the name of a script used in a `Data
Input Method`. This change is *not* automatically propagated to the poller
of sync. An example would be a change of the name of a script used in a
`Data Input Method`. This change is _not_ automatically propagated to the poller
cache. It is required, to run `php -q rebuild poller_cache.php` manually.
Calling the script with the parameter `--help` yields
@@ -148,30 +151,29 @@ reindex method governs the automatic re-indexing based on specific events.
###### Table 20-1. Re-Index Methods
Re-Index Method | Description
--- | ---
Uptime Goes Backwards | Refers to a system reboot
Index Count Changed | Refers to a change of the number of indexed items
Verify All Fields | All index fields of the according XML file are checked for changes
| Re-Index Method | Description |
| --------------------- | ------------------------------------------------------------------ |
| Uptime Goes Backwards | Refers to a system reboot |
| Index Count Changed | Refers to a change of the number of indexed items |
| Verify All Fields | All index fields of the according XML file are checked for changes |
If the method is set to `Uptime Goes Backwards`, Cacti will detect if the
target has been rebooted by querying sysUptime (.1.3.6.1.2.1.1.3.0). If
the current value for the uptime is lower than the previous one (uptime
goes backwards), a reboot is assumed and a re-index is performed
If the method is set to `Uptime Goes Backwards`, Cacti will detect if the target
has been rebooted by querying sysUptime (.1.3.6.1.2.1.1.3.0). If the current
value for the uptime is lower than the previous one (uptime goes backwards), a
reboot is assumed and a re-index is performed
If the method is set to `Index Count Change`, e.g. the number of interfaces,
without checking sysUptime. It is of particular interest in cases, where
indexed entries may change without the need of a reboot. As modern operating
systems seldom require reboots for system configuration changes, you may want
to consider this setting for many cases (e.g. creating of a new filesystem
without a reboot). The index to be considered is defined by the according
XML file.
without checking sysUptime. It is of particular interest in cases, where indexed
entries may change without the need of a reboot. As modern operating systems
seldom require reboots for system configuration changes, you may want to
consider this setting for many cases (e.g. creating of a new filesystem without
a reboot). The index to be considered is defined by the according XML file.
If the method is set to `Verify All Fields`, all indexes of the data source
are checked for changes. This is of particular interest e.g. in cases,
where the index is non-numeric (e.g. a MAC address). It should be noted that
in the 1.0 and 1.1 releases, this method was found to be broken and has been
corrected since 1.2.
If the method is set to `Verify All Fields`, all indexes of the data source are
checked for changes. This is of particular interest e.g. in cases, where the
index is non-numeric (e.g. a MAC address). It should be noted that in the 1.0
and 1.1 releases, this method was found to be broken and has been corrected
since 1.2.
If you feel the need for manual re-indexing, you may run it from CLI. Calling
the script with the parameter `--help` yields
@@ -239,22 +241,21 @@ DEBUG: Data query number '1' host: '2' SNMP Query Id: '1' ending
> **Caution**
>
> Re-Indexing interferes with the poller operation. Make sure that the
> poller is not running and will not start during a reindex operation
> Re-Indexing interferes with the poller operation. Make sure that the poller is
> not running and will not start during a reindex operation
## Empty Poller Output Table
During normal poller operation, all retrieved results are intermediately
stored in the table named poller_output After execution of cmd.php or
Spine, this table holds all results. The poller.php finally issues all
rrdtool update operations. Thus, after polling has completed, the table
should be empty.
During normal poller operation, all retrieved results are intermediately stored
in the table named poller_output After execution of cmd.php or Spine, this table
holds all results. The poller.php finally issues all rrdtool update operations.
Thus, after polling has completed, the table should be empty.
Conditions may arise, where the table is not (completely) emptied. The most
often known issue is lack of php memory. In those cases, the table is bigger
than the php memory size, thus not all items are handled correctly. If that
issue occurs, you may save all pending updates *after increasing PHP memory
appropriately* by running this very script. Calling the script with the
issue occurs, you may save all pending updates _after increasing PHP memory
appropriately_ by running this very script. Calling the script with the
parameter `--help` yields
```console
@@ -306,16 +307,16 @@ There were 21, RRD updates made this pass
shell>
```
If logging level verbosity was switched to `DEBUG` you may find
additional debug messages that usually show up in `cacti.log`
If logging level verbosity was switched to `DEBUG` you may find additional debug
messages that usually show up in `cacti.log`
## Reapply Suggested Names to Graphs
For a general understanding of suggested names used with data queries,
please see ?. Be aware, that changes to the `Suggested Names` section of
a data query will not automatically be propagated to all existing graphs.
This is, where poller_graphs_reapply_names.php drops in. Calling the
script with the parameter `--help` yields
For a general understanding of suggested names used with data queries, please
see ?. Be aware, that changes to the `Suggested Names` section of a data query
will not automatically be propagated to all existing graphs. This is, where
poller_graphs_reapply_names.php drops in. Calling the script with the parameter
`--help` yields
```console
shell>php -q poller_graphs_reapply_names.php --help
@@ -386,11 +387,11 @@ User copied...
Find the results of this program call at User Management
User Name\*\* | Full Name | Enabled | Realm | Default Graph Policy | Last Login
--- | --- | --- | --- | --- | ---
admin | Administrator | Yes | Local | ALLOW | Sunday, October 07, 2007 14:59:32
guest | Guest Account | Yes | Local | ALLOW | N/A
Harry Potter | Guest Account | Yes | Local | ALLOW | N/A
| User Name\*\* | Full Name | Enabled | Realm | Default Graph Policy | Last Login |
| ------------- | ------------- | ------- | ----- | -------------------- | --------------------------------- |
| admin | Administrator | Yes | Local | ALLOW | Sunday, October 07, 2007 14:59:32 |
| guest | Guest Account | Yes | Local | ALLOW | N/A |
| Harry Potter | Guest Account | Yes | Local | ALLOW | N/A |
## Add a New Device
@@ -499,9 +500,9 @@ Success - new device-id: (11)
Go to Devices to see the result:
Description** | Graphs | Data Sources | Status | Hostname | Current (ms) | Average (ms) | Availability
--- | ---| --- | --- | --- | --- | --- | ---
Device Add Test | 0 | 0 | Unknown | router.mydomain.com | 0 | 0 | 100
| Description\*\* | Graphs | Data Sources | Status | Hostname | Current (ms) | Average (ms) | Availability |
| --------------- | ------ | ------------ | ------- | ------------------- | ------------ | ------------ | ------------ |
| Device Add Test | 0 | 0 | Unknown | router.mydomain.com | 0 | 0 | 100 |
Use any other combination of parameters in the same way as via the web browser
console. You may want to remember the new device id, `11` in this case, for the
@@ -511,15 +512,15 @@ next steps.
It is recommended to maintain data query associations by maintaining host
templates. Each time, a data query is added to a host template, it will
automatically associated with all hosts related to that very host
template. The data query will be executed as well; this way the snmp
cache will be filled with all values related to that query.
automatically associated with all hosts related to that very host template. The
data query will be executed as well; this way the snmp cache will be filled with
all values related to that query.
Nevertheless, it is sometimes suitable to manually associate a certain
data query with a single host only without changing any host template.
This is, where the script `add_data_query.php` comes in. First, let's
have a look at the whole list of features it provides. Calling the script
with the parameter `--help` yields
Nevertheless, it is sometimes suitable to manually associate a certain data
query with a single host only without changing any host template. This is, where
the script `add_data_query.php` comes in. First, let's have a look at the whole
list of features it provides. Calling the script with the parameter `--help`
yields
```console
shell>php -q add_data_query.php --help
@@ -584,8 +585,8 @@ Success - Host (11: router.mydomain.com) data query (1: SNMP - Interface Statist
This example shows the use of a string `"fields"` for specifying the reindex
method. As given by the help text, the use of the numeric value of `"3"` would
have given the exact same result. When visiting the device edit panel, you will
find non-zero values for the data query status column, e.g. *Success [41 Items,
5 Rows]*.
find non-zero values for the data query status column, e.g. _Success [41 Items,
5 Rows]_.
## Associate a Graph Template to an existing Host
@@ -660,9 +661,9 @@ Success: Graph Template associated for host: (11: router) - graph-template: (7:
## Add a New Graph
You won't stop now as you've just created a device from cli. Surely, the
task of setting up graphs is the next step. This is done using
`add_graphs.php`. Calling the script with the parameter `--help` yields
You won't stop now as you've just created a device from cli. Surely, the task of
setting up graphs is the next step. This is done using `add_graphs.php`. Calling
the script with the parameter `--help` yields
```console
shell>php -q add_graphs.php
@@ -709,19 +710,18 @@ List Options:
Like the graph creation from the console, this task is split into two different
ones:
- **Associated Graph Templates:**
These are named `cg` graph_type for this script.
- **Associated Graph Templates:** These are named `cg` graph_type for this
script.
- **Associated Data Queries:**
These are named `ds` graph_type for this script. Additional SNMP parameters
are required to define those graphs.
- **Associated Data Queries:** These are named `ds` graph_type for this script.
Additional SNMP parameters are required to define those graphs.
> **Caution**
>
> When running this cli script, caution must be taken to avoid typos.
> Sometimes, list options take an ending “s”, where the option for graph
> creation comes without “s”. Error messages are not issued to indicate
> this typo; instead you will see the general help screen.
> When running this cli script, caution must be taken to avoid typos. Sometimes,
> list options take an ending “s”, where the option for graph creation comes
> without “s”. Error messages are not issued to indicate this typo; instead you
> will see the general help screen.
### List Options for Associated Graph Templates
@@ -760,8 +760,9 @@ We will need the graph template id of the `ucd/net - CPU Usage` template later.
So note the number `4` for it.
It is possible to reduce the listing to the graph templates associated with a
specific host template by using `--list-graph-templates
--host-template-id=[id]`. For a "ucd/net SNMP Host" this yields
specific host template by using
`--list-graph-templates --host-template-id=[id]`. For a "ucd/net SNMP Host" this
yields
```console
shell>php -q add_graphs.php --list-graph-templates --host-template-id=3
@@ -861,9 +862,9 @@ Graph Added - graph-id: (39) - data-source-id: (63)
Find the result when visiting Graph Management
Graph Title** | Template Name | Size
--- | --- | ---
Device Add Test - CPU Usage | ucd/net - CPU Usage | 120x500
| Graph Title\*\* | Template Name | Size |
| --------------------------- | ------------------- | ------- |
| Device Add Test - CPU Usage | ucd/net - CPU Usage | 120x500 |
If the graph template was not associated with that host before, it is now added
to the list of Associated Graph Templates.
@@ -874,13 +875,13 @@ First, let's sum up the id's of all resources required for this task:
###### Table 20-2. Parameters required for an Interface Traffic Graph
Object | Value | Description
--- | --- | ---
Graph Template Id | 2 | Interface - Traffic (bits/sec)
SNMP Query Id | 1 | SNMP - Interface Statistics
SNMP Query Type Id | 13 | In/Out Bits
SNMP Field | ifOperStatus | Field name
SNMP Value | Up | Field value
| Object | Value | Description |
| ------------------ | ------------ | ------------------------------ |
| Graph Template Id | 2 | Interface - Traffic (bits/sec) |
| SNMP Query Id | 1 | SNMP - Interface Statistics |
| SNMP Query Type Id | 13 | In/Out Bits |
| SNMP Field | ifOperStatus | Field name |
| SNMP Value | Up | Field value |
This will make up for the following command
@@ -892,10 +893,10 @@ Graph Added - graph-id: (40) - data-source-id: (65)
Find the result when visiting Graph Management
Graph Title** | Template Name | Size
--- | --- | ---
Device Add Test - CPU Usage | ucd/net - CPU Usage | 120x500
Device Add Test - Traffic - lo | Interface - Traffic (bits/sec) | 120x500
| Graph Title\*\* | Template Name | Size |
| ------------------------------ | ------------------------------ | ------- |
| Device Add Test - CPU Usage | ucd/net - CPU Usage | 120x500 |
| Device Add Test - Traffic - lo | Interface - Traffic (bits/sec) | 120x500 |
If the data query was not associated with that host before, it is now added to
the list of Associated Graph Templates. In this case, the Re-Index Method of
@@ -1031,9 +1032,9 @@ Known Host Graphs: (id, name, template)
### Add a new Tree
Cacti comes with a single tree, named Default Tree. Console entry Graph
Trees is used to add more trees. With `add_tree.php`, you may now do so
from command line as well:
Cacti comes with a single tree, named Default Tree. Console entry Graph Trees is
used to add more trees. With `add_tree.php`, you may now do so from command line
as well:
```console
shell>php -q add_tree.php --type=tree --name="Test Tree Add" --sort-method=manual
@@ -1061,14 +1062,14 @@ shell>php -q add_tree.php --type=node --node-type=header --tree-id=6 --name="Hea
Added Node node-id: (21)
```
You will want to save the id returned if willing to add further nodes to
exactly this new Header Node
You will want to save the id returned if willing to add further nodes to exactly
this new Header Node
Please note that it is currently not possible to add another header with
the same options even if this is possible from console
Please note that it is currently not possible to add another header with the
same options even if this is possible from console
But it is possible to add a subheader to an already defined header. Even
in this case, the `name` has to be unique
But it is possible to add a subheader to an already defined header. Even in this
case, the `name` has to be unique
```console
shell>php -q add_tree.php --type=node --node-type=header --tree-id=6 --parent-node=21 --name="SubHeader Test"
@@ -1078,9 +1079,9 @@ Added Node node-id: (22)
### Add a new Host Node to a Tree
We will distinguish several options adding a host to a tree. First, let's
add a Host directly to a tree. For this example, we use the tree id
returned from adding our own `Test Tree Add` known with `id=6`
We will distinguish several options adding a host to a tree. First, let's add a
Host directly to a tree. For this example, we use the tree id returned from
adding our own `Test Tree Add` known with `id=6`
```console
shell>php -q add_tree.php --type=node --node-type=host --tree-id=6 --host-id=1
@@ -1088,8 +1089,8 @@ shell>php -q add_tree.php --type=node --node-type=host --tree-id=6 --host-id=1
Added Node node-id: (23)
```
As no `--parent-node` was given, this host is directly added to the tree
itself. If you wish to add a host to a (sub)header specify as follows
As no `--parent-node` was given, this host is directly added to the tree itself.
If you wish to add a host to a (sub)header specify as follows
```console
shell>php -q add_tree.php --type=node --node-type=host --tree-id=6 --parent-node=21 --host-id=1
@@ -1098,8 +1099,8 @@ Added Node node-id: (24)
```
Both example come without a `--host-group-style` option. For those cases,
`Graph Template` host group style is default. Here's an example for
providing a host group option of `Data Query Index` instead
`Graph Template` host group style is default. Here's an example for providing a
host group option of `Data Query Index` instead
```console
shell>php -q add_tree.php --type=node --node-type=host --tree-id=6 --parent-node=22 --host-id=1 --host-group-style=2
@@ -1109,9 +1110,9 @@ Added Node node-id: (25)
### Add a new Graph Node to a Tree
Like above, instead of hosts it is possible to add a single graph to a
tree or a (sub)header of any tree. Of course, you again will require the
`id` of the tree and optionally of the `header`. This results in
Like above, instead of hosts it is possible to add a single graph to a tree or a
(sub)header of any tree. Of course, you again will require the `id` of the tree
and optionally of the `header`. This results in
```console
shell>php -q add_tree.php --type=node --node-type=graph --tree-id=6 --graph-id=5
@@ -1119,8 +1120,8 @@ shell>php -q add_tree.php --type=node --node-type=graph --tree-id=6 --graph-id=5
Added Node node-id: (26)
```
Like above, this graph now was added directly to the tree itself. To add
a graph to a header, proceed as follows
Like above, this graph now was added directly to the tree itself. To add a graph
to a header, proceed as follows
```console
shell>php -q add_tree.php --type=node --node-type=graph --tree-id=6 --parent-node=21 --graph-id=5
@@ -1128,8 +1129,8 @@ shell>php -q add_tree.php --type=node --node-type=graph --tree-id=6 --parent-nod
Added Node node-id: (27)
```
In both cases, no explicit `--rra-id` was given. This will default to the
Daily (5 Minute Average). Specify any other `--rra-id` as given
In both cases, no explicit `--rra-id` was given. This will default to the Daily
(5 Minute Average). Specify any other `--rra-id` as given
```console
shell>php -q add_tree.php --type=node --node-type=graph --tree-id=6 --parent-node=21 --graph-id=1 --rra-id=4
@@ -1141,9 +1142,9 @@ to provide the `--rra-id` for a rra of Yearly (1 Day Average).
## Add Graph Permissions
This script is used to specify special graph permissions to users. The
list of parameters is displayed as usual when calling the script with the
parameter `--help`
This script is used to specify special graph permissions to users. The list of
parameters is displayed as usual when calling the script with the parameter
`--help`
```console
shell>php -q add_perms.php --help
@@ -1235,58 +1236,57 @@ Known Host Graphs: (id, name, template)
### Add Graph Permissions to specific Users
There are various ways to define graph permissions to specific users.
First, we will add graph permissions for a given host. This is done using
the parameter `--item-type=host` as follows
There are various ways to define graph permissions to specific users. First, we
will add graph permissions for a given host. This is done using the parameter
`--item-type=host` as follows
```console
shell>php -q add_perms.php --user-id=4 --item-type=host --item-id=1
```
`--user-id=4` must specify an existing users. Else, an error message will
be printed. As `--item-type=host` is given, `--item-id=1` must specify a
valid host. Again, if no host with this specific id exists, an error
message will be printed. No output is produced on successful operations.
`--user-id=4` must specify an existing users. Else, an error message will be
printed. As `--item-type=host` is given, `--item-id=1` must specify a valid
host. Again, if no host with this specific id exists, an error message will be
printed. No output is produced on successful operations.
Next, we will add graph permissions for a given tree. This is done using
the parameter `--item-type=tree` as follows
Next, we will add graph permissions for a given tree. This is done using the
parameter `--item-type=tree` as follows
```console
shell>php -q add_perms.php --user-id=4 --item-type=tree --item-id=1
```
`--user-id=4` must specify an existing users. Else, an error message will
be printed. As `--item-type=tree` is given, `--item-id=1` must specify a
valid tree (the Default Tree in this case). Again, if no tree with this
specific id exists, an error message will be printed. No output is
produced on successful operations.
`--user-id=4` must specify an existing users. Else, an error message will be
printed. As `--item-type=tree` is given, `--item-id=1` must specify a valid tree
(the Default Tree in this case). Again, if no tree with this specific id exists,
an error message will be printed. No output is produced on successful
operations.
Adding graph permissions for a given graph template is done using the
parameter `--item-type=graph_template` as follows
Adding graph permissions for a given graph template is done using the parameter
`--item-type=graph_template` as follows
```console
shell>php -q add_perms.php --user-id=4 --item-type=graph_template --item-id=25
```
`--user-id=4` must specify an existing users. Else, an error message will
be printed. As `--item-type=graph_template` is given, `--item-id=1` must
specify a valid graph_template (the Interface - Traffic (bytes/sec) in
this case). Again, if no graph template with this specific id exists, an
error message will be printed. No output is produced on successful
operations.
`--user-id=4` must specify an existing users. Else, an error message will be
printed. As `--item-type=graph_template` is given, `--item-id=1` must specify a
valid graph_template (the Interface - Traffic (bytes/sec) in this case). Again,
if no graph template with this specific id exists, an error message will be
printed. No output is produced on successful operations.
Last but not least we add graph permissions for a given graph by using
the parameter `--item-type=graph` as follows
Last but not least we add graph permissions for a given graph by using the
parameter `--item-type=graph` as follows
```console
shell>php -q add_perms.php --user-id=4 --item-type=graph --item-id=8
```
`--user-id=4` must specify an existing users. Else, an error message will
be printed. As `--item-type=graph` is given, `--item-id=1` must specify a
valid graph. Again, if no graph template with this specific id exists, an
error message will be printed. No output is produced on successful
operations.
`--user-id=4` must specify an existing users. Else, an error message will be
printed. As `--item-type=graph` is given, `--item-id=1` must specify a valid
graph. Again, if no graph template with this specific id exists, an error
message will be printed. No output is produced on successful operations.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+46 -47
View File
@@ -6,69 +6,67 @@ 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.
[Cacti Translation Site](https://translate.cacti.net). From there, you
can simply select what you want translated, and the push the "translate"
button on your language of choice, and the beauty of the translation is
that if the string that you tranlate is in another plugin, it can also
be automatically translated at the same time.
[Cacti Translation Site](https://translate.cacti.net). From there, you can
simply select what you want translated, and the push the "translate" button on
your language of choice, and the beauty of the translation is that if the string
that you tranlate is in another plugin, it can also be automatically translated
at the same time.
If you make a change to the translations, they are automatically committed
back to GitHub programatically. To install the new language strings,
you simply have to update the `locales` directory from the latest
GitHub branch that you were translating.
If you make a change to the translations, they are automatically committed back
to GitHub programatically. 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 separate subdirectories. They are:
```console
# ls -1 locales/
LC_MESSAGES
po
```
```console
# ls -1 locales/
LC_MESSAGES
po
```
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.
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.
## 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 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 include the updated file in your pull request, it will
keep the development engine running smooth.
If you include the updated file in your pull request, it will keep the
development engine running smooth.
## 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 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.
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 interface directly. See the Weblate documentation on how to upload your
modified `language.po` files.
account. From there, you can upload your modified `language.po` files into the
interface directly. See the Weblate documentation on how to upload your modified
`language.po` files.
4. Once Poedit is installed, open it, and select File -> New from POT/PO file,
and select the cacti.pot file. When you click 'Open', it will ask you for
what language you are translating to. Cacti uses the dual syntax of
Language (Country). So, for French, you would select 'French (France)'.
1. Once Poedit is installed, open it, and select File -> New from POT/PO file,
and select the cacti.pot file. When you click 'Open', it will ask you for
what language you are translating to. Cacti uses the dual syntax of Language
(Country). So, for French, you would select 'French (France)'.
5. Once you have done that, you can start your translation. You will select
each phrase one at a time, and enter in the translation in your language.
1. Once you have done that, you can start your translation. You will select each
phrase one at a time, and enter in the translation in your language.
6. You should save your work often.
1. You should save your work often.
7. You can test your work on a test installation. Upload both .mo and .po files
1. You can test your work on a test installation. Upload both .mo and .po files
to your test installation and change your user profile to use the language
you have just updated.
8. Cacti and its plugins get updates very often. To make sure the translations
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.
@@ -78,12 +76,13 @@ The PO Editor will create both a PO and MO file every time you save the file.
The final name of the file will have to be changed to Cacti's standard naming.
For example, Poedit saves the file from the example above as `fr_FR.po`, but
Cacti will need these files name in hyphenated format, so: `fr_FR.po`, becomes
`fr-FR.po`. Make that note especially if you are starting a new language.
`fr-FR.po`. Make that note especially if you are starting a new language.
## Considerations
As Cacti is GPL2.0+, you acknowledge, by sigining up to the Cacti Weblate
site, that your contributions will be GPL2.0+ as well.
As Cacti is GPL2.0+, you acknowledge, by sigining up to the Cacti Weblate site,
that your contributions will be GPL2.0+ as well.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -52,4 +52,4 @@ your code confirms to this, as there are strict checks in place which will fail
your submission if it fails these standards.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -128,4 +128,4 @@ You will now need to install Cacti on the remote server selecting the
![Remote Data Collector Setup](images/data-collectors-remote-setup.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -45,4 +45,4 @@ correction.
> since the RRDfiles associated with them will not be updated as expected for with an
> available Device.
--- <copy>Copyright (c) 2004-2023 The Cacti Group</copy>
--- Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -176,4 +176,4 @@ simple command output in the following example
[How To Create a Data Input Method](How-To-Create-Data-Input-Method.md).
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+27 -45
View File
@@ -9,39 +9,18 @@ This section will describe **Data Source Profiles** in Cacti.
The following values are for the disk usage per Data source for the respective
data profile
### 30 second polling
Daily 48kb
Weekly 43kb
Monthly 46kb
Yearly 140kb
### 1 minute polling
Daily 93kb / data source
Weekly 45kb / data source
Monthly 47kb /datasource
Yearly 140KB/data source
### 5 minute polling
Daily 19kb / data source
Weekly 22kb / data source
Monthly 25kb / data source
Yearly 26kb / data source
| polling time | type | size per ds | polling time | type | size per ds |
| -----------: | ------- | ----------: | -----------: | ------ | ----------: |
| 30 second | Daily | 48kb | 30 second | Weekly | 43kb |
| 30 second | Monthly | 46kb | 30 second | Yearly | 140kb |
| 1 minute | Daily | 93kb | 1 minute | Weekly | 45kb |
| 1 minute | Monthly | 47kb | 1 minute | Yearly | 140kb |
| 5 minute | Daily | 19kb | 5 minute | Weekly | 22kb |
| 5 minute | Monthly | 25kb | 5 minute | Yearly | 26kb |
![Data Source Profiles RRA Edit](images/data-source-profiles-edit2.png)
### Changing data profile averages
## Changing data profile averages
The Cacti GUI allows you to change the averages on a specific Data source
profile some setups require a higher resolution of data and you may want to
@@ -50,7 +29,7 @@ due to the bigger sized RRDfile
To do this follow these steps
#### Method 1 - New system without any hosts
### Method 1 - New system without any hosts
1. Login to Cacti
@@ -60,17 +39,17 @@ To do this follow these steps
4. Select the period which you want to edit i.e weekly
5. If you wish to change the average select the aggregate level for 1 minute
you will be able to go as low as 5 Minutes
5. If you wish to change the average select the aggregate level for 1 minute you
will be able to go as low as 5 Minutes
6. You will need to edit the Rows amount to match the data retention you want
to set after this period the data will be averaged out to the monthly graph
6. You will need to edit the Rows amount to match the data retention you want to
set after this period the data will be averaged out to the monthly graph
7. Save config and generate graphs
#### Method 2 - Existing device(s) on system
### Method 2 - Existing device(s) on system
This is a more data destructive route and it will depend on your situation. If
This is a more data destructive route and it will depend on your situation. If
you have graphs already on cacti you will not be able to use Method 1. An option
if you do not care about the graphs is to either remove the graphs via the gui
or run the following script `/cli/php remove_graphs.php with the --all`
@@ -79,17 +58,20 @@ function.
This will REMOVE ALL THE GRAPHS and you can then follow the steps outlined in
Method 1 to change the profile how you like
### Data profile Rows Calculation
## Data profile Rows Calculation
The rows calculation take in to account the following
Rows = Aggregate level * hours
```console
Rows = Aggregate level \* hours
```
Example
1 Minute aggregate level storing for 3 days ( 72 hours)
(Aggregate level)60 * 72 ( 72 hours) = 4,320
> **Example**
>
> 1 Minute aggregate level storing for 3 days ( 72 hours)
>
> (Aggregate level)60 \* 72 ( 72 hours) = 4,320
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+151 -150
View File
@@ -2,59 +2,60 @@
## Overview
Cacti **Data Queries** are not a replacement for **Data Input Methods** in Cacti.
Instead they provide an easy way to extend Data Input methods to interpret
multidimensional objects, or list data based upon an index, making the data
easier to graph. The most common use of a **Data Query within
Cacti is to retrieve a list of network interfaces via SNMP. If you want to
graph the traffic of a network interface, first Cacti must retrieve a list
of interfaces on the host. Second, Cacti can use that information to create
the necessary **Graphs** and **Data Sources**. **Data Queries** are only
concerned with the first step of the process, that is obtaining a list of
network interfaces and not creating the graphs/data sources for them. While
listing network interfaces is a common use for **Data Queries**, they also
have other uses such as listing partitions, processors, or even cards in
a router.
Cacti **Data Queries** are not a replacement for **Data Input Methods** in
Cacti. Instead they provide an easy way to extend Data Input methods to
interpret multidimensional objects, or list data based upon an index, making the
data easier to graph. The most common use of a \*\*Data Query within Cacti is to
retrieve a list of network interfaces via SNMP.
One requirement for any **Data Query** in Cacti, is that it has some unique value
that defines each row in the list. This concept follows that of a 'primary key'
in SQL, and makes sure that each row in the list can be uniquely referenced.
Examples of these index values are 'ifIndex' for SNMP network interfaces or the
device name for partitions.
If you want to graph the traffic of a network interface, first Cacti must
retrieve a list of interfaces on the host. Second, Cacti can use that
information to create the necessary **Graphs** and **Data Sources**. **Data
Queries** are only concerned with the first step of the process, that is
obtaining a list of network interfaces and not creating the graphs/data sources
for them. While listing network interfaces is a common use for \*\*Data
Queries\*\*, they also have other uses such as listing partitions, processors,
or even cards in a router.
One requirement for any **Data Query** in Cacti, is that it has some unique
value that defines each row in the list. This concept follows that of a 'primary
key' in SQL, and makes sure that each row in the list can be uniquely
referenced. Examples of these index values are 'ifIndex' for SNMP network
interfaces or the device name for partitions.
There are three types of **Data queries** that you will see referred to
throughout Cacti. They are script queries, script server queries, and
SNMP queries. Script, Script Server and SNMP queries are virtually identical
in their functionality and only differ in how they obtain their information.
Script and Script Server queries will call an external command or script
and an SNMP query will make an SNMP call to retrieve a list of data.
throughout Cacti. They are script queries, script server queries, and SNMP
queries. Script, Script Server and SNMP queries are virtually identical in their
functionality and only differ in how they obtain their information. Script and
Script Server queries will call an external command or script and an SNMP query
will make an SNMP call to retrieve a list of data.
## User Interface
Below, you can see Cacti's default **Data Queries** interface. From the
Below, you can see Cacti's default **Data Queries** interface. From the
interface, you can see the Name, ID, Data Input Method, and other information
about the Data Query.
![Data Query Interface](images/data-queries.png)
When you edit an existing Data Query, you will see an interface like the one
below. In that interface, you will note that there is an XML file path
included. The XML file is a key component of a Cacti **Data Query**. For
Script based **Data Queries**, there will also be a script that must be
called to gather information about the **Data Query**, the script name is
included in the XML file.
below. In that interface, you will note that there is an XML file path included.
The XML file is a key component of a Cacti **Data Query**. For Script based
**Data Queries**, there will also be a script that must be called to gather
information about the **Data Query**, the script name is included in the XML
file.
![Data Query Edit Interface](images/data-queries-edit1.png)
In this Interface, you can see the Name, Description, XML Path, and **Data
Input Method**. In the section below that, you have the
`Associated Graph Templates` section which includes all the various
**Graph Templates** that can be used for the **Data Query**.
In this Interface, you can see the Name, Description, XML Path, and **Data Input
Method**. In the section below that, you have the `Associated Graph Templates`
section which includes all the various **Graph Templates** that can be used for
the **Data Query**.
Once a **Data Query** **Graph Template** is in use, it can not longer be
removed from Cacti. This feature is there to prevent **Graphs** from
becoming unrenderable if someone accidentally were to remove the **Graph
Template** association.
Once a **Data Query** **Graph Template** is in use, it can not longer be removed
from Cacti. This feature is there to prevent **Graphs** from becoming
unrenderable if someone accidentally were to remove the **Graph Template**
association.
When you click on any of the `Associated Graph Template` name, you will be taken
to the interface below.
@@ -62,28 +63,27 @@ to the interface below.
![Data Query Associated Graph Template Edit Interface](images/data-queries-edit2.png)
From here, you map the various matching **Data Template** RRDfile Data Source
names to Data Source names that exist in the XML file. There can be many
Data Source names in the XML file, but a Graph Template may only require a few
of them, which explains the reason for having the `Associated Data Templates`
section of the **Data Query**. To associate the XML field with the
**Data Templates** RRDfile Data Source, you simply select the correct
one, and then toggle on the checkbox to the right of the XML field
Data Source name.
names to Data Source names that exist in the XML file. There can be many Data
Source names in the XML file, but a Graph Template may only require a few of
them, which explains the reason for having the `Associated Data Templates`
section of the **Data Query**. To associate the XML field with the **Data
Templates** RRDfile Data Source, you simply select the correct one, and then
toggle on the checkbox to the right of the XML field Data Source name.
Below the `Associated Data Templates`, you will find two sections which are
referred to as `Suggested Values` for both the **Data Source** and the
**Graph** names. When creating **Graphs** and their associated **Data Sources**
Cacti will use the first name in the `Suggested Values` pattern that fully
replaces all the tags that are identified by opening and closing vertical
bars. So, in the example above, when creating an Interface Graph, if
that Interface does not have an ifAlias, Cacti will likely use the second
`Suggested Value`, unless the interface does not have an IP Address, in which
case it will use the third `Suggested Value`.
referred to as `Suggested Values` for both the **Data Source** and the **Graph**
names. When creating **Graphs** and their associated **Data Sources** Cacti will
use the first name in the `Suggested Values` pattern that fully replaces all the
tags that are identified by opening and closing vertical bars. So, in the
example above, when creating an Interface Graph, if that Interface does not have
an ifAlias, Cacti will likely use the second `Suggested Value`, unless the
interface does not have an IP Address, in which case it will use the third
`Suggested Value`.
Cacti also allows `Suggested Values`, to replace both **Graph** and **Data Source**
values, as in the case above, the "rrd_maximum" column is replaced by the
Network Interfaces maximum speed, otherwise known as the "ifSpeed" from an SNMP
perspective.
Cacti also allows `Suggested Values`, to replace both **Graph** and **Data
Source** values, as in the case above, the "rrd_maximum" column is replaced by
the Network Interfaces maximum speed, otherwise known as the "ifSpeed" from an
SNMP perspective.
All data queries have two parts, the XML file and the definition within Cacti.
An XML file must be created for each query, that defines where each piece of
@@ -101,12 +101,12 @@ information about the data query, described in more detail below.
###### Table 12-1. Field Description: Data Queries
Name | Description
--- | ---
Name | Give the **Data Query** a name that you will use to identify it. This name will be used throughout Cacti when presented with a list of **Data Queries**.
Description (Optional) | Enter a more detailed description of the data query including the information it queries or additional requirements.
XML Path | Fill in the full path to the XML file that defines this query. You can optionally use the `path_cacti` variable that will be substituted with the full path to Cacti. On the next screen, Cacti will check to make sure that it can find the XML file.
Data Input Method | This is how you tell Cacti to handle the data it receives from the data query. Typically, you will select `Get SNMP Data (Indexed)` for an SNMP query and `Get Script Data (Indexed)` for a script query.
| Name | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | Give the **Data Query** a name that you will use to identify it. This name will be used throughout Cacti when presented with a list of **Data Queries**. |
| Description (Optional) | Enter a more detailed description of the data query including the information it queries or additional requirements. |
| XML Path | Fill in the full path to the XML file that defines this query. You can optionally use the `path_cacti` variable that will be substituted with the full path to Cacti. On the next screen, Cacti will check to make sure that it can find the XML file. |
| Data Input Method | This is how you tell Cacti to handle the data it receives from the data query. Typically, you will select `Get SNMP Data (Indexed)` for an SNMP query and `Get Script Data (Indexed)` for a script query. |
When you are finished filling in all necessary fields, click the Create button
to continue. You will be redirected back to the same page, but this time with
@@ -125,26 +125,26 @@ Templates box. You will be presented with a few fields to fill in:
###### Table 12-2. Field Description: Associated Graph Templates
Name | Description
--- | ---
Name | Give a name describing what kind of data you are trying to represent or graph. When the user creates a graph using this data query, they will see a list of graph template associations that they will have to choose from.
Graph Template | Choose the actual graph template that you want to make the association with.
| Name | Description |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Give a name describing what kind of data you are trying to represent or graph. When the user creates a graph using this data query, they will see a list of graph template associations that they will have to choose from. |
| Graph Template | Choose the actual graph template that you want to make the association with. |
When you are finished filling in these fields, click the Create button. You
will be redirected back to the same page with some additional information to
fill in. Cacti will make a list of each **Data Template** referenced to in your
selected **Graph Template** and display them under the `Associated Data Templates`
box. As previously mentioned, for each **Data Source** item listed, you
must selected the **Data Query** output field that corresponds with it.
*Do not forget to check the checkbox to the right of each selection, or your
settings will not be saved.*
When you are finished filling in these fields, click the Create button. You will
be redirected back to the same page with some additional information to fill in.
Cacti will make a list of each **Data Template** referenced to in your selected
**Graph Template** and display them under the `Associated Data Templates` box.
As previously mentioned, for each **Data Source** item listed, you must selected
the **Data Query** output field that corresponds with it. _Do not forget to
check the checkbox to the right of each selection, or your settings will not be
saved._
The `Suggested Values` form provides you a way to control field values of
**Data Sources** and **Graphs** created using the **Data Query**. If you
specify multiple `Suggested Values` for the same field, Cacti will evaluate
them in order which you can control using the up or down arrow icons.
For more information about valid field names and variables, read the
section on `Suggested Values`.
The `Suggested Values` form provides you a way to control field values of **Data
Sources** and **Graphs** created using the **Data Query**. If you specify
multiple `Suggested Values` for the same field, Cacti will evaluate them in
order which you can control using the up or down arrow icons. For more
information about valid field names and variables, read the section on
`Suggested Values`.
When you are finished filling in all necessary fields on this form, click the
Save button to return to the data queries edit screen. Repeat the steps under
@@ -180,40 +180,40 @@ query to hosts.
###### Table 12-3. SNMP Query XML Settings Reference
Field | Description
--- | ---
name | (Optional) You can enter a "friendly name" for the SNMP Query here. It will not be used by Cacti, and is for identification only.
description | (Optional) You can enter a description for the SNMP Query here. It will not be used by Cacti, and is for identification only.
oid_uptime | If you have another OID that contains ticks (time), say for example a Java VM. Then, you can create a data query that specifies an alternate uptime OID. To implement this for a data query, simply add the oid_uptime XML parameter to your XML file. Then, if you select your re-index method to be Uptime Goes Backward, Cacti will use that OID to detect whether it is time to re-index the host instead of the standard SNMP OID for uptime.
oid_index | Every SNMP Query must have an OID that represents the index values for the query when walked. As described above, any data query in Cacti must contain a field that uniquely identifies each row returned by the query. In the example above, the oid_index points to the OID of ifIndex in the interface MIB. Note: Cacti is able to parse unique indexes from the OID itself. While the regular expression used for parsing the value from the OID is defined below, you must still specify an OID that can be walked by Cacti in order to obtain the list of OID's. Any OID defined for one of your input fields should work in this case. The values returned from the snmpwalk walk will be completely disregarded.
non_unique | If set to true, Cacti will allow the Data Query index to be non-unique, and it will not attempt to change the index_order if for some reason, the chosen index field is not unique.
oid_index_parse | This field should only be used if you are trying to parse the unique index from the OID itself. If this field is defined, to obtain a list of indexes, Cacti walks the OID provided in the oid_index field above. It then applies the regular expression provided in this field to the list of OID's that are returned. The matched substrings that remain become the list of indexes for this SNMP Query.
value_index_parse | This field uses regular expressions to restrict the list of data returned from the get or walk method. For example: <oid_index>.1.3.6.1.2.1.2.2.1.8</oid_index> <value_index_parse>OID/REGEXP:1</value_index_parse> will only show the list of up-state interfaces. Tip - When using this field it is also worth using oid_index_parse, example: <oid_index_parse>OID/REGEXP:.*\.([0-9]+)$</oid_index_parse>
oid_num_indexes | An OID that can be queried to determine the total number of available indexes. If specified, this will be used to determine when to automatically re-cache this SNMP Query when it is attached to a device.
index_order | 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_transient | If set to 'true', this field instructs Cacti not to stop attempting to Graph an index if it disappears from the host cache as a result of a re-index. This setting is for indexes that come and go, for example PPPoE statitics or user statistics which appear when a user log's in, but disappear a few hours after the connection is terminated.
index_order_type | For sorting purposes, specify whether the index is numeric or alphanumeric. numeric: The indexes in this SNMP Query are to be sorted numerically (ie. 1,2,3,10,20,31) alphabetic: The indexes in this SNMP Query are to be sorted alphabetically (1,10,2,20,3,31).
index_title_format | 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 (&#124;). The variable `&#124;chosen_order_field&#124;` will be substituted with the field chosen by Cacti to index off of (see index_order above).
| Field | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name | (Optional) You can enter a "friendly name" for the SNMP Query here. It will not be used by Cacti, and is for identification only. |
| description | (Optional) You can enter a description for the SNMP Query here. It will not be used by Cacti, and is for identification only. |
| oid_uptime | If you have another OID that contains ticks (time), say for example a Java VM. Then, you can create a data query that specifies an alternate uptime OID. To implement this for a data query, simply add the oid_uptime XML parameter to your XML file. Then, if you select your re-index method to be Uptime Goes Backward, Cacti will use that OID to detect whether it is time to re-index the host instead of the standard SNMP OID for uptime. |
| oid_index | Every SNMP Query must have an OID that represents the index values for the query when walked. As described above, any data query in Cacti must contain a field that uniquely identifies each row returned by the query. In the example above, the oid_index points to the OID of ifIndex in the interface MIB. Note: Cacti is able to parse unique indexes from the OID itself. While the regular expression used for parsing the value from the OID is defined below, you must still specify an OID that can be walked by Cacti in order to obtain the list of OID's. Any OID defined for one of your input fields should work in this case. The values returned from the snmpwalk walk will be completely disregarded. |
| non_unique | If set to true, Cacti will allow the Data Query index to be non-unique, and it will not attempt to change the index_order if for some reason, the chosen index field is not unique. |
| oid_index_parse | This field should only be used if you are trying to parse the unique index from the OID itself. If this field is defined, to obtain a list of indexes, Cacti walks the OID provided in the oid_index field above. It then applies the regular expression provided in this field to the list of OID's that are returned. The matched substrings that remain become the list of indexes for this SNMP Query. |
| value_index_parse | This field uses regular expressions to restrict the list of data returned from the get or walk method. For example: <oid_index>.1.3.6.1.2.1.2.2.1.8</oid_index> <value_index_parse>OID/REGEXP:1</value_index_parse> will only show the list of up-state interfaces. Tip - When using this field it is also worth using oid_index_parse, example: <oid_index_parse>OID/REGEXP:.\*\.([0-9]+)$</oid_index_parse> |
| oid_num_indexes | An OID that can be queried to determine the total number of available indexes. If specified, this will be used to determine when to automatically re-cache this SNMP Query when it is attached to a device. |
| index_order | 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_transient | If set to 'true', this field instructs Cacti not to stop attempting to Graph an index if it disappears from the host cache as a result of a re-index. This setting is for indexes that come and go, for example PPPoE statitics or user statistics which appear when a user log's in, but disappear a few hours after the connection is terminated. |
| index_order_type | For sorting purposes, specify whether the index is numeric or alphanumeric. numeric: The indexes in this SNMP Query are to be sorted numerically (ie. 1,2,3,10,20,31) alphabetic: The indexes in this SNMP Query are to be sorted alphabetically (1,10,2,20,3,31). |
| index_title_format | 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 (&#124;). The variable `&#124;chosen_order_field&#124;` will be substituted with the field chosen by Cacti to index off of (see index_order above). |
###### Table 12-4. SNMP Query XML Field Settings Reference
Each field contained within the SNMP Query must be defined under the field tag
as show in the example above. In addition, each defined field in the SNMP Query
as show in the example above. In addition, each defined field in the SNMP Query
must have a unique name given to it. Do not use spaces or any non-alphanumeric
characters, this name must be identifiable within Cacti.
Field | Description
--- | ---
name | Here you can specify a "friendly name" for the field. This name will be used by Cacti to help the user identify this field.
method | Tell Cacti how you want it to gather SNMP information for this field. get: The `get` method performs an snmpget for the OID specified for this field appended by the index values derived from `<oid_index>/<oid_index_parse>`. walk: The `walk` method does a walk of the OID specified for this field. If all OIDs belong to the same SNMP table, both methods will return the same values, even though the 'walk' method is typically more efficient.
source | When Cacti obtains a list for this field, you need to tell it how to derive its value for each row. value: The 'value' option simply returns the result of the snmpget for each row. **OID/REGEXP** (regexp_match): The **OID/REGEXP** modifier can be used when you need to use a POSIX-based regular expression to derive the value from the OID. The most common example of this is to retrieve the IP address of an interface, and can be seen in the 'interface.xml' file. **VALUE/REGEXP** (regexp_match): The **VALUE/REGEXP** modifier can be used to parse the value based on a regular expression, returning the first match. index: Simply use the value of the index for this row as the value. If the index is being parsed from the OID using the oid_index_parse field, you must specify index here. Omit the `<oid>...</oid>` field, then. **OID2HEX/REGEXP** (regexp_match): The **OID2HEX/REGEXP** modifier can be used to parse the OID to extract IPv6 addresses. This is useful for input type fields. It also supports the 'oid_index_parse' expression as well.
direction | input: Input values are the "known" values that you will use to derive the output values, this is where the "query" part of SNMP query comes in. When you create a graph based on an SNMP query, Cacti will prompt you to choose the input value to base the graph on. output: Output values are "unknown" values that are returned from the script. An SNMP query may return multiple statistics for a single index. For instance, a single interface could return bytes/sec in, errors, packets/sec, etc. A rule of thumb is that input fields contain semi-static data that is not graphable, while the output fields contain the data that will be graphed.
oid | You must specify the actual OID that corresponds with the field. Each value for this field can be obtained by doing an snmpget on `oid.(each)snmpindex`.
oid_rewrite_pattern | You can specifv and **OID/REGEXP** string which will be replaced by the oid_rewrite_replacement string if found.
oid_rewrite_replacement | You must specify the actual OID that corresponds with the field. Each value for this field can be obtained by doing an snmpget on `oid.(each)snmpindex`.
oid_suffix | The suffix, if specified will be appended to the each oid from the walk or get response, prior to the oid_rewrite_pattern to oid_rewrite_replace regular expression replace. If the method is get, Cacti will issue an snmpget to obtain the resulting data.
rewrite_index | Modifies the snmp values using the rewrite_index expression.
output_format | Determines the output format of the column values. Options are 'ascii', 'hex'. If not specified, Cacti will allow SNMP to 'guess' the output format.
| Field | Description |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | Here you can specify a "friendly name" for the field. This name will be used by Cacti to help the user identify this field. |
| method | Tell Cacti how you want it to gather SNMP information for this field. get: The `get` method performs an snmpget for the OID specified for this field appended by the index values derived from `<oid_index>/<oid_index_parse>`. walk: The `walk` method does a walk of the OID specified for this field. If all OIDs belong to the same SNMP table, both methods will return the same values, even though the 'walk' method is typically more efficient. |
| source | When Cacti obtains a list for this field, you need to tell it how to derive its value for each row. value: The 'value' option simply returns the result of the snmpget for each row. **OID/REGEXP** (regexp_match): The **OID/REGEXP** modifier can be used when you need to use a POSIX-based regular expression to derive the value from the OID. The most common example of this is to retrieve the IP address of an interface, and can be seen in the 'interface.xml' file. **VALUE/REGEXP** (regexp_match): The **VALUE/REGEXP** modifier can be used to parse the value based on a regular expression, returning the first match. index: Simply use the value of the index for this row as the value. If the index is being parsed from the OID using the oid_index_parse field, you must specify index here. Omit the `<oid>...</oid>` field, then. **OID2HEX/REGEXP** (regexp_match): The **OID2HEX/REGEXP** modifier can be used to parse the OID to extract IPv6 addresses. This is useful for input type fields. It also supports the 'oid_index_parse' expression as well. |
| direction | input: Input values are the "known" values that you will use to derive the output values, this is where the "query" part of SNMP query comes in. When you create a graph based on an SNMP query, Cacti will prompt you to choose the input value to base the graph on. output: Output values are "unknown" values that are returned from the script. An SNMP query may return multiple statistics for a single index. For instance, a single interface could return bytes/sec in, errors, packets/sec, etc. A rule of thumb is that input fields contain semi-static data that is not graphable, while the output fields contain the data that will be graphed. |
| oid | You must specify the actual OID that corresponds with the field. Each value for this field can be obtained by doing an snmpget on `oid.(each)snmpindex`. |
| oid_rewrite_pattern | You can specifv and **OID/REGEXP** string which will be replaced by the oid_rewrite_replacement string if found. |
| oid_rewrite_replacement | You must specify the actual OID that corresponds with the field. Each value for this field can be obtained by doing an snmpget on `oid.(each)snmpindex`. |
| oid_suffix | The suffix, if specified will be appended to the each oid from the walk or get response, prior to the oid_rewrite_pattern to oid_rewrite_replace regular expression replace. If the method is get, Cacti will issue an snmpget to obtain the resulting data. |
| rewrite_index | Modifies the snmp values using the rewrite_index expression. |
| output_format | Determines the output format of the column values. Options are 'ascii', 'hex'. If not specified, Cacti will allow SNMP to 'guess' the output format. |
## Script Query XML Syntax
@@ -243,33 +243,33 @@ output_format | Determines the output format of the column values. Options are
###### Table 12-5. Script Query XML Settings
Field | Description
--- | ---
name | (Optional) You can enter a "friendly name" for the script query here. It will not be used by Cacti, and is for identification only.
description | (Optional) You can enter a description for the script query here. It will not be used by Cacti, and is for identification only.
script_path | Enter the complete path to the script or executable that is going to handle your script query. When in doubt, specify the pull path to all binaries referenced in this path, the query may not execute otherwise.
arg_index | Enter the argument that is to be passed to the script to retrieve a list of indexes.
arg_query | Enter the argument that is to be passed to the script to retrieve a list of values given a field name.
arg_get | Enter the argument that is to be passed to the script to retrieve a single value given a field name and index value.
arg_num_indexes | Enter the argument that is to be passed to the script to determine the total number of available indexes. If specified, this will be used to determine when to automatically re-cache this script query when it is attached to a device.
output_delimeter | Enter the one character delimiter that will be used to separate output values. This is only used when you "query" the script in which case it outputs 'index(delimiter)value'.
index_order | 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_transient | If set to 'true', this field instructs Cacti not to stop attempting to Graph an index if it disappears from the host cache as a result of a re-index. This setting is for indexes that come and go, for example PPPoE statitics or user statistics which appear when a user log's in, but disappear a few hours after the connection is terminated.
index_order_type | For sorting purposes, specify whether the index is numeric or alphanumeric. numeric: The indexes in this script query are to be sorted numerically (ie. 1,2,3,10,20,31) alphabetic: The indexes in this script query are to be sorted alphabetically (1,10,2,20,3,31).
index_title_format | 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 (&#124;). The variable &#124;chosen_order_field&#124; will be substituted with the field chosen by Cacti to index off of (see index_order above).
| Field | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | (Optional) You can enter a "friendly name" for the script query here. It will not be used by Cacti, and is for identification only. |
| description | (Optional) You can enter a description for the script query here. It will not be used by Cacti, and is for identification only. |
| script_path | Enter the complete path to the script or executable that is going to handle your script query. When in doubt, specify the pull path to all binaries referenced in this path, the query may not execute otherwise. |
| arg_index | Enter the argument that is to be passed to the script to retrieve a list of indexes. |
| arg_query | Enter the argument that is to be passed to the script to retrieve a list of values given a field name. |
| arg_get | Enter the argument that is to be passed to the script to retrieve a single value given a field name and index value. |
| arg_num_indexes | Enter the argument that is to be passed to the script to determine the total number of available indexes. If specified, this will be used to determine when to automatically re-cache this script query when it is attached to a device. |
| output_delimeter | Enter the one character delimiter that will be used to separate output values. This is only used when you "query" the script in which case it outputs 'index(delimiter)value'. |
| index_order | 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_transient | If set to 'true', this field instructs Cacti not to stop attempting to Graph an index if it disappears from the host cache as a result of a re-index. This setting is for indexes that come and go, for example PPPoE statitics or user statistics which appear when a user log's in, but disappear a few hours after the connection is terminated. |
| index_order_type | For sorting purposes, specify whether the index is numeric or alphanumeric. numeric: The indexes in this script query are to be sorted numerically (ie. 1,2,3,10,20,31) alphabetic: The indexes in this script query are to be sorted alphabetically (1,10,2,20,3,31). |
| index_title_format | 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 (&#124;). The variable &#124;chosen_order_field&#124; will be substituted with the field chosen by Cacti to index off of (see index_order above). |
###### Table 12-6. Script Query XML Field Settings
Each field contained within the Script Query must be defined under the field tag
as show in the example above. In addition, each defined field in the Script
as show in the example above. In addition, each defined field in the Script
Query must have a unique name given to it. Do not use spaces or any
non-alphanumeric characters, this name must be identifiable within Cacti.
Field | Description
--- | ---
name | Here you can specify a "friendly name" for the field. This name will be used by Cacti to help the user identify this field.
direction | input: Input values are the "known" values that you will use to derive the output values, this is where the "query" part of script query comes in. When you create a graph based on a script query, Cacti will prompt you to choose the input value to base the graph on. output: Output values are "unknown" values that are returned from the script. A script query may return multiple statistics for a single index. For instance, a single partition could return free disk space, total disk space, fragmentation percentage, etc. A rule of thumb is that input fields contain semi-static data that is not graphable, while the output fields contain the data that will be graphed.
query_name | Enter the name that Cacti must use when asking the script for information about this field. For instance, the following should return values: '(script_name) query (query_name)'.
| Field | Description |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | Here you can specify a "friendly name" for the field. This name will be used by Cacti to help the user identify this field. |
| direction | input: Input values are the "known" values that you will use to derive the output values, this is where the "query" part of script query comes in. When you create a graph based on a script query, Cacti will prompt you to choose the input value to base the graph on. output: Output values are "unknown" values that are returned from the script. A script query may return multiple statistics for a single index. For instance, a single partition could return free disk space, total disk space, fragmentation percentage, etc. A rule of thumb is that input fields contain semi-static data that is not graphable, while the output fields contain the data that will be graphed. |
| query_name | Enter the name that Cacti must use when asking the script for information about this field. For instance, the following should return values: '(script_name) query (query_name)'. |
## Script Server XML Syntax
@@ -308,35 +308,36 @@ query_name | Enter the name that Cacti must use when asking the script for infor
###### Table 12-7. Script Server XML Settings
Field | Description
--- | ---
name | (Optional) You can enter a "friendly name" for the script query here. It will not be used by Cacti, and is for identification only.
description | (Optional) You can enter a description for the script query here. It will not be used by Cacti, and is for identification only.
script_path | Enter the complete path to the script or executable that is going to handle your script query. When in doubt, specify the pull path to all binaries referenced in this path, the query may not execute otherwise.
script_function | The function within the script in the case where the script can be used for multiple data collection functions. Most script server scripts are associated with only one Data Query, but it's possible to have one script perform the collection for multiple Data Queries.
arg_prepend | A list of device variables from the host to prepend after the script function when calling the script. This information can be used to identify the device that is being monitored or pass certain device information to the script.
arg_index | Enter the argument that is to be passed to the script to retrieve a list of indexes.
arg_query | Enter the argument that is to be passed to the script to retrieve a list of values given a field name.
arg_get | Enter the argument that is to be passed to the script to retrieve a single value given a field name and index value.
arg_num_indexes | Enter the argument that is to be passed to the script to determine the total number of available indexes. If specified, this will be used to determine when to automatically re-cache this script query when it is attached to a device.
output_delimeter | Enter the one character delimiter that will be used to separate output values. This is only used when you "query" the script in which case it outputs 'index(delimiter)value'.
index_order | 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_transient | If set to 'true', this field instructs Cacti not to stop attempting to Graph an index if it disappears from the host cache as a result of a re-index. This setting is for indexes that come and go, for example PPPoE statitics or user statistics which appear when a user log's in, but disappear a few hours after the connection is terminated.
index_order_type | For sorting purposes, specify whether the index is numeric or alphanumeric. numeric: The indexes in this script query are to be sorted numerically (ie. 1,2,3,10,20,31) alphabetic: The indexes in this script query are to be sorted alphabetically (1,10,2,20,3,31).
index_title_format | 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 (&#124;). The variable &#124;chosen_order_field&#124; will be substituted with the field chosen by Cacti to index off of (see index_order above).
| Field | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | (Optional) You can enter a "friendly name" for the script query here. It will not be used by Cacti, and is for identification only. |
| description | (Optional) You can enter a description for the script query here. It will not be used by Cacti, and is for identification only. |
| script_path | Enter the complete path to the script or executable that is going to handle your script query. When in doubt, specify the pull path to all binaries referenced in this path, the query may not execute otherwise. |
| script_function | The function within the script in the case where the script can be used for multiple data collection functions. Most script server scripts are associated with only one Data Query, but it's possible to have one script perform the collection for multiple Data Queries. |
| arg_prepend | A list of device variables from the host to prepend after the script function when calling the script. This information can be used to identify the device that is being monitored or pass certain device information to the script. |
| arg_index | Enter the argument that is to be passed to the script to retrieve a list of indexes. |
| arg_query | Enter the argument that is to be passed to the script to retrieve a list of values given a field name. |
| arg_get | Enter the argument that is to be passed to the script to retrieve a single value given a field name and index value. |
| arg_num_indexes | Enter the argument that is to be passed to the script to determine the total number of available indexes. If specified, this will be used to determine when to automatically re-cache this script query when it is attached to a device. |
| output_delimeter | Enter the one character delimiter that will be used to separate output values. This is only used when you "query" the script in which case it outputs 'index(delimiter)value'. |
| index_order | 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_transient | If set to 'true', this field instructs Cacti not to stop attempting to Graph an index if it disappears from the host cache as a result of a re-index. This setting is for indexes that come and go, for example PPPoE statitics or user statistics which appear when a user log's in, but disappear a few hours after the connection is terminated. |
| index_order_type | For sorting purposes, specify whether the index is numeric or alphanumeric. numeric: The indexes in this script query are to be sorted numerically (ie. 1,2,3,10,20,31) alphabetic: The indexes in this script query are to be sorted alphabetically (1,10,2,20,3,31). |
| index_title_format | 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 (&#124;). The variable &#124;chosen_order_field&#124; will be substituted with the field chosen by Cacti to index off of (see index_order above). |
###### Table 12-6. Script Server XML Field Settings
Each field contained within the Script Query must be defined under the field tag
as show in the example above. In addition, each defined field in the Script
as show in the example above. In addition, each defined field in the Script
Query must have a unique name given to it. Do not use spaces or any
non-alphanumeric characters, this name must be identifiable within Cacti.
Field | Description
--- | ---
name | Here you can specify a "friendly name" for the field. This name will be used by Cacti to help the user identify this field.
direction | input: Input values are the "known" values that you will use to derive the output values, this is where the "query" part of script query comes in. When you create a graph based on a script query, Cacti will prompt you to choose the input value to base the graph on. output: Output values are "unknown" values that are returned from the script. A script query may return multiple statistics for a single index. For instance, a single partition could return free disk space, total disk space, fragmentation percentage, etc. A rule of thumb is that input fields contain semi-static data that is not graphable, while the output fields contain the data that will be graphed.
query_name | Enter the name that Cacti must use when asking the script for information about this field. For instance, the following should return values: '(script_name) query (query_name)'.
| Field | Description |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | Here you can specify a "friendly name" for the field. This name will be used by Cacti to help the user identify this field. |
| direction | input: Input values are the "known" values that you will use to derive the output values, this is where the "query" part of script query comes in. When you create a graph based on a script query, Cacti will prompt you to choose the input value to base the graph on. output: Output values are "unknown" values that are returned from the script. A script query may return multiple statistics for a single index. For instance, a single partition could return free disk space, total disk space, fragmentation percentage, etc. A rule of thumb is that input fields contain semi-static data that is not graphable, while the output fields contain the data that will be graphed. |
| query_name | Enter the name that Cacti must use when asking the script for information about this field. For instance, the following should return values: '(script_name) query (query_name)'. |
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+79 -58
View File
@@ -9,97 +9,118 @@ The Data source then holds the value to be presented to the graph.
The Data source template is then associated with a graph template.
These data sources can be for example incoming traffic on an interface.
Cacti allows you to create data source templates to associate to data queries
the template allows you to describe what type of data Cacti should expect.
These data sources can be for example incoming traffic on an interface. Cacti
allows you to create data source templates to associate to data queries the
template allows you to describe what type of data Cacti should expect.
To create a Data source you will need to select the proper data input there are
several options but the most popular ones would be GET SNMP data or GET SNMP
data (indexed.)
You would use Get SNMP data (indexed) for interfaces for example as Cacti would
need to query the device to find the interface index. You would use Get SNMP
need to query the device to find the interface index. You would use Get SNMP
data and put in a single OID for an OID that won't change for example CPU usage
generally does not have an index and the OID won't change
You will also need to tell the template what the data source type is.
The most common ones being Gauge and Counter. These data types come from the
RRDtool its self here are the following supported data types and their uses
You will also need to tell the template what the data source type is. The most
common ones being Gauge and Counter. These data types come from the RRDtool its
self. Below are the supported data types and their uses. For more information
see
[RRD Tool Create Function](https://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html)
(Source https://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html)
## GAUGE
GAUGE
GUAGE is for things like temperatures or number of people in a room or the value
of a RedHat share.
is for things like temperatures or number of people in a room or the value of a RedHat share.
## COUNTER
COUNTER
COUNTER is for continuous incrementing counters like the ifInOctets counter in a
router. The COUNTER data source assumes that the counter never decreases, except
when a counter overflows. The update function takes the overflow into account.
is for continuous incrementing counters like the ifInOctets counter in a router.
The COUNTER data source assumes that the counter never decreases, except when a counter overflows.
The update function takes the overflow into account. The counter is stored as a per-second rate.
When the counter overflows, RRDtool checks if the overflow happened at the 32bit or 64bit border
and acts accordingly by adding an appropriate value to the result.
The counter is stored as a per-second rate. When the counter overflows, RRDtool
checks if the overflow happened at the 32bit or 64bit border and acts
accordingly by adding an appropriate value to the result.
DCOUNTER
## DCOUNTER
the same as COUNTER, but for quantities expressed as double-precision floating point number.
Could be used to track quantities that increment by non-integer numbers, i.e. number of seconds that some routine has taken to run,
total weight processed by some technology equipment etc.
The only substantial difference is that DCOUNTER can either be upward counting or downward counting, but not both at the same time.
The current direction is detected automatically on the second non-undefined counter update and any further change in the direction is considered a reset.
The new direction is determined and locked in by the second update after reset and its difference to the value at reset.
DCOUNTER the same as COUNTER, but for quantities expressed as double-precision
floating point number. It could be used to track quantities that increment by
non-integer numbers, i.e. number of seconds that some routine has taken to run,
total weight processed by some technology equipment etc.
DERIVE
The only substantial difference is that DCOUNTER can either be upward counting
or downward counting, but not both at the same time. The current direction is
detected automatically on the second non-undefined counter update and any
further change in the direction is considered a reset. The new direction is
determined and locked in by the second update after reset and its difference to
the value at reset.
will store the derivative of the line going from the last to the current value of the data source.
This can be useful for gauges, for example, to measure the rate of people entering or leaving a room.
Internally, derive works exactly like COUNTER but without overflow checks.
So if your counter does not reset at 32 or 64 bit you might want to use DERIVE and combine it with a MIN value of 0.
## DERIVE
DDERIVE
DERIVE will store the derivative of the line going from the last to the current
value of the data source. This can be useful for gauges, for example, to measure
the rate of people entering or leaving a room. Internally, derive works exactly
like COUNTER but without overflow checks. So if your counter does not reset at
32 or 64 bit you might want to use DERIVE and combine it with a MIN value of 0.
the same as DERIVE, but for quantities expressed as double-precision floating point number.
## DDERIVE
NOTE on COUNTER vs DERIVE
DDERIVE the same as DERIVE, but for quantities expressed as double-precision
floating point number.
by Don Baarda <don.baarda@baesystems.com>
> **NOTE**: on COUNTER vs DERIVE
>
> by Don Baarda <don.baarda@baesystems.com>
>
> If you cannot tolerate ever mistaking the occasional counter reset for a
> legitimate counter wrap, and would prefer "Unknowns" for all legitimate
> counter wraps and resets, always use DERIVE with min=0. Otherwise, using
> COUNTER with a suitable max will return correct values for all legitimate
> counter wraps, mark some counter resets as "Unknown", but can mistake some
> counter resets for a legitimate counter wrap.
>
> For a 5 minute step and 32-bit counter, the probability of mistaking a counter
> resetfor a legitimate wrap is arguably about 0.8% per 1Mbps of maximum
> bandwidth. Note that this equates to 80% for 100Mbps interfaces, so for high
> bandwidth interfaces and a 32bit counter, DERIVE with min=0 is probably
> preferable. If you are using a 64bit counter, just about any max setting will
> eliminate the possibility of mistaking a reset for a counter wrap.
If you cannot tolerate ever mistaking the occasional counter reset for a legitimate counter wrap,
and would prefer "Unknowns" for all legitimate counter wraps and resets, always use DERIVE with min=0.
Otherwise, using COUNTER with a suitable max will return correct values for all legitimate counter wraps,
mark some counter resets as "Unknown", but can mistake some counter resets for a legitimate counter wrap.
## ABSOLUTE
For a 5 minute step and 32-bit counter, the probability of mistaking a counter reset for a legitimate wrap is arguably about 0.8% per 1Mbps of maximum bandwidth.
Note that this equates to 80% for 100Mbps interfaces, so for high bandwidth interfaces and a 32bit counter, DERIVE with min=0 is probably preferable.
If you are using a 64bit counter, just about any max setting will eliminate the possibility of mistaking a reset for a counter wrap.
ABSOLUTE is for counters which get reset upon reading. This is used for fast
counters which tend to overflow. So instead of reading them normally you reset
them after every read to make sure you have a maximum time available before the
next overflow. Another usage is for things you count like number of messages
since the last update.
ABSOLUTE
## COMPUTE
is for counters which get reset upon reading. This is used for fast counters which tend to overflow.
So instead of reading them normally you reset them after every read to make sure you have a maximum time available before the next overflow.
Another usage is for things you count like number of messages since the last update.
COMPUTE
is for storing the result of a formula applied to other data sources in the RRD.
This data source is not supplied a value on update, but rather its Primary Data Points (PDPs) are computed from the PDPs of the data sources
according to the rpn-expression that defines the formula.
Consolidation functions are then applied normally to the PDPs of the COMPUTE data source (that is the rpn-expression is only applied to generate PDPs).
In database software, such data sets are referred to as "virtual" or "computed" columns.
COMPUTE is for storing the result of a formula applied to other data sources in
the RRD. This data source is not supplied a value on update, but rather its
Primary Data Points (PDPs) are computed from the PDPs of the data sources
according to the rpn-expression that defines the formula. Consolidation
functions are then applied normally to the PDPs of the COMPUTE data source (that
is the rpn-expression is only applied to generate PDPs). In database software,
such data sets are referred to as "virtual" or "computed" columns.
![Data-Source-Templates](images/datasource-template-create.png)
You are also able to use Variables to set the name for the data source.
The available Variables can be seen here
https://github.com/Cacti/documentation/blob/develop/Variables.md
You are also able to use Variables to set the name for the data source. The
available Variables can be seen on the
[Variables](https://github.com/Cacti/documentation/blob/develop/Variables.md)
documentation page.
![Data-Source-Templates](images/datasource-template.png)
What is also an important setting is the internal data source name.
This will be used to asociate the Data source with the Graph template.
so be sure to name is something that is recognizable.
What is also an important setting is the internal data source name. This will be
used to asociate the Data source with the Graph template. so be sure to name is
something that is recognizable.
![Data-Source-Templates](images/datasource-template2.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+28 -42
View File
@@ -1,25 +1,25 @@
# Data Source Management
Data sources in Cacti are the points of data that Cacti will collect from a
device. The following are examples of different sources that can be utililised
device. The following are examples of different sources that can be utililised
for graphing, though is just the surface of what is achievable:
- Monitoring a device via ping will usually count as 1 data source.
- A 24 port switch and you poll the device via snmp and graph all of
the ports then there will be 24 data sources
- A 24 port switch and you poll the device via snmp and graph all of the ports
then there will be 24 data sources
> **Note**: if you add more graphs that base their data on the original
> **Data source** that would not count as another **Data Source** since
> it uses the already existing source.
> **Note**: if you add more graphs that base their data on the original **Data
> source** that would not count as another **Data Source** since it uses the
> already existing source.
For example, if you have a 24 port switch that you create an **In/Out Bits**
graph for each interface, and you then add the **In/Out Bits with 95th
Percentile** for each interface, you would still only have 24 data sources.
Keeping on top of the amount of data sources you have is important as the more
data sources you have the more resources you will need to allocate
to your server.
data sources you have the more resources you will need to allocate to your
server.
You can see how many data sources are associated with a single device by going
to management then clicking on devices.
@@ -39,47 +39,33 @@ This output tells us we have 162 data sources on the system.
### Storage considerations and datasources
The amount of data sources on your system has an impact on the amount of storage
you will need. You will also need to consider what rate you are polling your
devices. e.g. 1 minute or 5 Minute polls
you will need. You will also need to consider what rate you are polling your
devices. e.g. 1 minute or 5 Minute polls
Here is the approximate amount of storage you can expect to consume per data source
Here is the approximate amount of storage you can expect to consume per data
source
###### 30 second polling
Retention | File size
------------- |:-------------:
Daily | 48kb
Weekly | 43kb
Monthly | 46kb
Yearly | 140kb
###### 1 minute polling
Retention | File size
------------- |:-------------:
Daily | 93kb
Weekly | 45kb
Monthly | 47kb
Yearly | 140kb
###### 5 minute polling
Retention | File size
------------- |:-------------:
Daily | 19b
Weekly | 22kb
Monthly | 25kb
Yearly | 26kb
| Polling time | Retention | File size | Polling time | Retention | File size |
| -----------: | --------- | --------: | -----------: | --------- | --------: |
| 30 second | Daily | 48kb | 30 second | Weekly | 43kb |
| 30 second | Monthly | 46kb | 30 second | Yearly | 140kb |
| 1 minute | Daily | 93kb | 1 minute | Weekly | 45kb |
| 1 minute | Monthly | 47kb | 1 minute | Yearly | 140kb |
| 5 minute | Daily | 19b | 5 minute | Weekly | 22kb |
| 5 minute | Monthly | 25kb | 5 minute | Yearly | 26kb |
### Viewing all Data sources by device
You are able to check the data sources associated to a specific device in the Console -> Management -> Data sources
You can then search based on a device you may be interested in to view the Data sources in use
You are able to check the data sources associated to a specific device in the
Console -> Management -> Data sources You can then search based on a device you
may be interested in to view the Data sources in use
![device datasources](images/data-sources-per-device.png)
You can also view Orphaned data sources in this view by setting Orphaned from All to Orphaned
Orphaned data sources are where the graph has been deleted but the data source was not deleted
You can also view Orphaned data sources in this view by setting Orphaned from
All to Orphaned Orphaned data sources are where the graph has been deleted but
the data source was not deleted
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -254,4 +254,4 @@ User "criggie" reported an issue with running smartctl. It was complaining "you
are not root" so a quick `chmod +s` on the script fixed that problem.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -29,4 +29,4 @@ If the System/Device you are matching has a unique OID you can also match based
on that.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -43,4 +43,4 @@ select it from the drop down, and press the *Add* button. There is no need to
the right of the desired **Graph Template** or **Data Query**.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -139,4 +139,4 @@ Success - new device-id: (45)
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -31,4 +31,4 @@ From this Menu you will be able to fill out the details of the new device.
![Discovered Devices](images/discovered-device-add-menu.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+26 -27
View File
@@ -1,39 +1,37 @@
# Template Exporting
Cacti allows **Device**, **Graph**, and **Data** Templates to be
exported in XML format. You can access the screen below by going
to `Console > Import / Export > Template Export`. When you get
to this page, the most popular option is to export the
**Device Template**, but the discretion is upto the user. Once
you pick the object type, the list of available templates
is presented. The most popular option is to save to a file,
but you have additional options.
Cacti allows **Device**, **Graph**, and **Data** Templates to be exported in XML
format. You can access the screen below by going to
`Console > Import / Export > Template Export`. When you get to this page, the
most popular option is to export the **Device Template**, but the discretion is
upto the user. Once you pick the object type, the list of available templates is
presented. The most popular option is to save to a file, but you have additional
options.
![Import Template](images/export-template.png)
Inside of the Template, Cacti uses a **hash** Global Uniqueue ID (GUID)
to uniquely identify every Template component. So, any Template
that you export can be shared with anyone around the globe without
ambiguity. See the Linux Device Template Example below.
Inside of the Template, Cacti uses a **hash** Global Uniqueue ID (GUID) to
uniquely identify every Template component. So, any Template that you export can
be shared with anyone around the globe without ambiguity. See the Linux Device
Template Example below.
In this Template thaere are Many Components:
1) The Device Template Name itself and it's GUID
2) All the Graph Templates and their GUID's
3) All the Graph Template inputs and their GUID's
4) All the Data Templates and their GUID's
5) All the Data Input Method's and their GUID's
6) All the GPrint Presets and their GUID's
7) All the CDEF's and VDEF's and their GUID's
8) All the Data Source Profiles and their GUID's
1. The Device Template Name itself and it's GUID
2. All the Graph Templates and their GUID's
3. All the Graph Template inputs and their GUID's
4. All the Data Templates and their GUID's
5. All the Data Input Method's and their GUID's
6. All the GPrint Presets and their GUID's
7. All the CDEF's and VDEF's and their GUID's
8. All the Data Source Profiles and their GUID's
Although the output is human readable, some columns are encoded
so as to not cause problems with the XML output format.
To read them, you must base64_decode them in PHP or some
other language.
Although the output is human readable, some columns are encoded so as to not
cause problems with the XML output format. To read them, you must base64_decode
them in PHP or some other language.
Presently they are saved in XML format, but there are
discussions with making these templates YAML formatted.
Presently they are saved in XML format, but there are discussions with making
these templates YAML formatted.
```xml
<cacti>
@@ -539,4 +537,5 @@ discussions with making these templates YAML formatted.
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -16,4 +16,4 @@ This feature can be very useful to create a single UI for helpdesk/NOC.
![External Links Example](images/external-links-example1.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+124 -100
View File
@@ -6,10 +6,10 @@
**A:** Before you can create traffic graphs, Cacti must have working SNMP
support. One way to do this is to compile PHP with SNMP support built in, many
times you can install the 'php-snmp' package to do this. The second option is
to have Cacti call the snmpget and snmpwalk binaries from your ucd-snmp or
net-snmp installation. You can use the about page to determine whether to are
using "built-in" or "external" SNMP support.
times you can install the 'php-snmp' package to do this. The second option is to
have Cacti call the snmpget and snmpwalk binaries from your ucd-snmp or net-snmp
installation. You can use the about page to determine whether to are using
"built-in" or "external" SNMP support.
Now that you have working SNMP support, follow these steps.
@@ -17,8 +17,8 @@ Now that you have working SNMP support, follow these steps.
2. Click Add to add a new device.
3. Type a description, hostname, management IP, and SNMP community. Make sure
to select "Generic SNMP-enabled Host" under Host Template and click Create.
3. Type a description, hostname, management IP, and SNMP community. Make sure to
select "Generic SNMP-enabled Host" under Host Template and click Create.
4. Click Create Graphs for this Host at the top of the page.
@@ -27,8 +27,7 @@ Now that you have working SNMP support, follow these steps.
to graph. Below the box, select type of graph that you want to create (bits,
bytes, summation, etc).
6. Click Create, and Create again on the following screen to create your
graphs.
6. Click Create, and Create again on the following screen to create your graphs.
## General
@@ -37,7 +36,7 @@ login prompt.
**A:** Starting with Cacti 1.2.x, the first thing you should always see is a
login prompt asking for your admin credentials before the installation wizard
will be displayed. However, if you fail to see the login prompt, you may be
will be displayed. However, if you fail to see the login prompt, you may be
presented with text that looks like:
```php
@@ -53,18 +52,20 @@ presented with text that looks like:
```
If this happens, it usually means that you have not enabled the PHP module to
work with your web server software. This can be as simple as running `a2enmod`
work with your web server software. This can be as simple as running `a2enmod`
on Ubuntu, or having to manually create a configuration for nginx under another
flavour of Linux. For specific help on enabling PHP, search the internet using
flavour of Linux. For specific help on enabling PHP, search the internet using
your favourite search engine with keywords such as:
> How do I enable PHP under ...
Replacing the three dots with your operating system and web server software
should reveal many results on how to do this. The specific steps are outside of
should reveal many results on how to do this. The specific steps are outside of
the scope of Cacti's FAQ documentation, though there are several How To
installation documents included that may also help.
---
**Q:** I have forgotten my 'admin' password to Cacti, how do I reset it?
**A:** To reset the admin account password back to the default of 'admin',
@@ -85,47 +86,54 @@ MySQL> update user_auth set password=md5('admin') where username='admin';
**Q:** I am polling thousands of items and poller.php takes more than 5 minutes
to run.
**A:** Give Spine, the fast replacement for poller.php a try. Unlike
poller.php, Spine is written in c and makes use of threads. On a typical
installation, it is not uncommon for Spine to poll about 50000 items in less then
10 seconds. Spine supports upto several threads per poller process and
can also poll a single hosts with more than a single thread. If using spine
alone does not help, look to both the amount of memory and CPU threads are
available on your Cacti server. You should generally not use more than 2 times
the number of CPU threads as you have spine threads. Remember, every spine
thread has to also talk to the database, so having more CPU threads on your
Cacti server has a direct impact on performance. If you make the thread
setting too high, it will actually decrease performance. So, be careful.
**A:** Give Spine, the fast replacement for poller.php a try. Unlike poller.php,
Spine is written in c and makes use of threads. On a typical installation, it is
not uncommon for Spine to poll about 50000 items in less then 10 seconds. Spine
supports upto several threads per poller process and can also poll a single
hosts with more than a single thread.
If using spine alone does not help, look to both the amount of memory and CPU
threads are available on your Cacti server. You should generally not use more
than 2 times the number of CPU threads as you have spine threads. Remember,
every spine thread has to also talk to the database, so having more CPU threads
on your Cacti server has a direct impact on performance. If you make the thread
setting too high, it will actually decrease performance. So, be careful.
---
**Q:** I changed x, and now some of my graphs are not updating.
**A:** First, check your Poller Cache to see if the poller entries for the
Data Sources in question are still found there. Then, if you find that they
are missing, you can either resave the Device in question, if it's a single
device, or Repopulate the Poller cache if it impacts multiple Devices. If
you have a large installation with thousands or tens of thousands of devices
you should use the CLI script `rebuild_poller_cache.php` to perform this action.
**A:** First, check your Poller Cache to see if the poller entries for the Data
Sources in question are still found there. Then, if you find that they are
missing, you can either resave the Device in question, if it's a single device,
or Repopulate the Poller cache if it impacts multiple Devices. If you have a
large installation with thousands or tens of thousands of devices you should use
the CLI script `rebuild_poller_cache.php` to perform this action.
Often times, if you have changed a Template, bad things can happen. So, it's
Often times, if you have changed a Template, bad things can happen. So, it's
always advisable to have a backup of your Graph and Data Templates as well as
any Script or XML files you used to create the Templates. Another good practice
any Script or XML files you used to create the Templates. Another good practice
is to perform database backups daily just in case of either an unintended
change, or a disaster.
---
**Q:** I am using Redhat 8.0 and SNMP is not working.
**A:** Redhat 8.0 comes with a broken php-snmp package. Updating your
'php-snmp' and 'net-snmp' packages to their latest versions should fix this
problem.
**A:** Redhat 8.0 comes with a broken php-snmp package. Updating your 'php-snmp'
and 'net-snmp' packages to their latest versions should fix this problem.
---
**Q:** How do I configure net-snmp so it will work with Cacti?
**A:** Run `snmpconf -g basic_setup` and follow the prompts. Also check that
the file being used by snmpd is the correct config file. For Redhat Linux,
snmpconf creates the `/etc/snmpd.conf`, but snmpd uses `/etc/snmpd/snmpd.conf`.
**A:** Run `snmpconf -g basic_setup` and follow the prompts. Also check that the
file being used by snmpd is the correct config file. For Redhat Linux, snmpconf
creates the `/etc/snmpd.conf`, but snmpd uses `/etc/snmpd/snmpd.conf`.
If this doesn't work a very simple config file is:
```console
# contact
syslocation Something
syscontact "root@someone.com"
@@ -141,34 +149,37 @@ If this doesn't work a very simple config file is:
# Allow for real big disk volumes
realStorageUnits 0
```
After you have made the changes to the net-snmp configuration file, you should
restart the service using the following command:
After you have made the changes to the net-snmp configuration file, you should
restart the service using the following command:
```sh
shell> systemctl enable snmpd
shell> systemctl restart snmpd
```
```sh
systemctl enable snmpd
systemctl restart snmpd
```
Though there are many more advanced settings available in net-snmp, it generally
recommended to keep a simpler configuration unless your information security
policies require more stringent settings.
Though there are many more advanced settings available in net-snmp, it generally
recommended to keep a simpler configuration unless your information security
policies require more stringent settings.
**Q:** I've installed Cacti, and scheduled a network discovery, but nothing
is happening. Where should I go to see the issue?
---
**A:** You should click the **Log** tab at the top of the page. When you get
to the **Log** tab, you should search for an entry "SYSTEM STATS:". If you
do not find that entry, it means that you Cacti Data Collector, otherwise known
as the Cacti Poller is not running.
**Q:** I've installed Cacti, and scheduled a network discovery, but nothing is
happening. Where should I go to see the issue?
This can happen if you have neglected to create either a CRON entry for the
Cacti Poller, or registered and started the `cactid` service available in
the latest Cacti. If you find that the CRON entry is there, you should look
at your systems CRON log for entries like **permission denied**. Sometimes
the user accounts you have selected to run the CRON are not permitted to do
so. We strongly recommend that you use the `cactid` service with Cacti 1.x
though and avoid CRON based Data Collection though.
**A:** You should click the **Log** tab at the top of the page. When you get to
the **Log** tab, you should search for an entry "SYSTEM STATS:". If you do not
find that entry, it means that you Cacti Data Collector, otherwise known as the
Cacti Poller is not running.
This can happen if you have neglected to create either a CRON entry for the
Cacti Poller, or registered and started the `cactid` service available in the
latest Cacti. If you find that the CRON entry is there, you should look at your
systems CRON log for entries like **permission denied**. Sometimes the user
accounts you have selected to run the CRON are not permitted to do so. We
strongly recommend that you use the `cactid` service with Cacti 1.x though and
avoid CRON based Data Collection though.
## Graphs
@@ -176,11 +187,11 @@ If this doesn't work a very simple config file is:
**A:** For you to actually get graph images, poller.php must run at least once
so it can create .rrd files in Cacti's 'rra/' directory. Double check that you
configured your `/etc/crontab` file or the `cactid` service to execute poller.php
at the desired frequency, normally either every 1 or 5 minutes. Also make sure
that the user poller.php runs as has permission to create new files in Cacti's 'rra/'
directory. In the modern Cacti, both the Web Server account and Cacti's Poller
account must have write access.
configured your `/etc/crontab` file or the `cactid` service to execute
poller.php at the desired frequency, normally either every 1 or 5 minutes. Also
make sure that the user poller.php runs as has permission to create new files in
Cacti's 'rra/' directory. In the modern Cacti, both the Web Server account and
Cacti's Poller account must have write access.
If all of your settings appear correct, try running poller.php manually by
cd'ing to Cacti's directory and typing:
@@ -190,27 +201,31 @@ shell> php poller.php
```
If you have files in your 'rra/' directory, but your graphs still appear as
broken images, you should enable graph debug mode see exactly why the graphs
are not rendering. To do this go into Cacti, select Graph Management from the
menu, select any graph listed, and select Turn On Graph Debug Mode.
broken images, you should enable graph debug mode see exactly why the graphs are
not rendering. To do this go into Cacti, select Graph Management from the menu,
select any graph listed, and select Turn On Graph Debug Mode.
---
**Q:** My graphs render, but they do not contain any data.
**A:** More often than not, this problem's cause is permissions. For instance
if you run poller.php manually as root for testing, any .rrd files that it
creates will be owned by root. Now when poller.php runs from cron, it will not
be able to update these .rrd files because they are owned by root. You can
double check the owner of your .rrd files by running the following command in
your Cacti directory:
**A:** More often than not, this problem's cause is permissions. For instance if
you run poller.php manually as root for testing, any .rrd files that it creates
will be owned by root. Now when poller.php runs from cron, it will not be able
to update these .rrd files because they are owned by root. You can double check
the owner of your .rrd files by running the following command in your Cacti
directory:
```sh
shell> ls -al rra/
```
If only some of your graphs are not updating correctly, double check the
Maximum Value field for all data sources used by these graphs. If the value
being fed to the .rrd file exceeds its Maximum Value, RRDtool will insert an
Unknown and you will see no data on the graph.
If only some of your graphs are not updating correctly, double check the Maximum
Value field for all data sources used by these graphs. If the value being fed to
the .rrd file exceeds its Maximum Value, RRDtool will insert an Unknown and you
will see no data on the graph.
---
**Q:** A lot of my graphs contain long ifAlias names, but they are being
truncated to 15 characters.
@@ -219,24 +234,31 @@ truncated to 15 characters.
can change this limit, by going to Cacti Settings on the Cacti menu, selecting
the Visual tab, and changing the value for Data Queries - Maximum Field Length.
---
**Q:** One of my devices rebooted and now I have a huge spike on my graph!
**A:** This occurs because the reboot causes SNMP counters to reset, which
can cause a rather large spike on the graph when RRDtool tries to determine the
change between the new small counter value and the large previous value. One
way to combat this issue is to specify realistic maximum values for your data
**A:** This occurs because the reboot causes SNMP counters to reset, which can
cause a rather large spike on the graph when RRDtool tries to determine the
change between the new small counter value and the large previous value. One way
to combat this issue is to specify realistic maximum values for your data
sources. RRDtool will ignore any value that is larger than the maximum value.
If you already have a spike on one or more of your graphs, there is a really
[useful Perl script](http://cricket.sourceforge.net/contrib/files/killspike2)
that will remove them for you.
---
**Q:** I have a remote poller that is timing out but SNMP timing to the devices is fine
**Q:** I have a remote poller that is timing out but SNMP timing to the devices
is fine
**A:** Check that the network connection between the Remote poller and Main poller is working ok
if the link has very high latency this can cause the polling times to increase as the data being
transfered from the remote poller will be slowed causing the poll not to finish in time
**A:** Check that the network connection between the Remote poller and Main
poller is working ok if the link has very high latency this can cause the
polling times to increase as the data being transfered from the remote poller
will be slowed causing the poll not to finish in time
---
**Q:** RRDtool Says: ERROR: unknown option '--slope-mode' or RRDtool Says:
ERROR: Garbage ':39:24 To 2005/10/22 16:39:24\c' after command: COMMENT:From
@@ -268,8 +290,8 @@ passed since the last poll!
This warning message may be recorded in the Cacti logs if you have a mismatch
between the cron file that runs the poller.php and the settings within Cacti
itself. Browse to **Console > Configuration > Settings > Poller** *(tab)*
and check that the Cron Interval is defined as either 1 minute or 5 minutes.
itself. Browse to **Console > Configuration > Settings > Poller** _(tab)_ and
check that the Cron Interval is defined as either 1 minute or 5 minutes.
If the cron inteval is 5 minutes, then the schedule within the cron
configuration file (normally /etc/cron.d/cacti) should be set to:
@@ -293,23 +315,24 @@ POLLER: Poller[0] Maximum runtime of xxx seconds exceeded.
This error indicates that Cacti was unable to finish the polling cycle in time.
This can be for a few reasons.
* You are using spine and have not entered the correct mysql credentials in spine.conf
* You do not have an adaquete process setting for cmd.php or thread/process
- You are using spine and have not entered the correct mysql credentials in
spine.conf
- You do not have an adaquete process setting for cmd.php or thread/process
count for spine
* Network related issue either an network outage or a network slowdown
* System related trouble cpu/memory exhaustion
* Insufficient MySQL connections resulting in spine failing
- Network related issue either an network outage or a network slowdown
- System related trouble cpu/memory exhaustion
- Insufficient MySQL connections resulting in spine failing
### RRDtool reports Unknown Error
Sometimes, RRDtool can be rather unhelpful and display the simple error within
the graph image of "Unknown Error". When this occurs, the best course of action
the graph image of "Unknown Error". When this occurs, the best course of action
would be to grab the command that Cacti uses and see if any more information is
given at the command line level.
To do this, edit a graph that has the issue, select **Turn On Graph Debug** and
a new section should appear beneath the graph. This should show both the
command and what output we received from the tool.
a new section should appear beneath the graph. This should show both the command
and what output we received from the tool.
```console
RRDtool Command:
@@ -355,10 +378,10 @@ RRDtool Says:
OK
```
If the output above isn't helpful, simply copy the command section and then
run it as the user which the website runs as. For Linux, you can do this by
either `su - <user>` and then running the command, or `sudo -u <user> <command>`
to stay as your current user but run the command as the website user.
If the output above isn't helpful, simply copy the command section and then run
it as the user which the website runs as. For Linux, you can do this by either
`su - <user>` and then running the command, or `sudo -u <user> <command>` to
stay as your current user but run the command as the website user.
For Windows, the following command will allow you to spawn a command prompt as
the website user, from which you can then run the above command to see the
@@ -372,4 +395,5 @@ The newly created command prompt should show the user name if you have entered
the correct password.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -23,4 +23,4 @@ Below you can see the GPrint Preset edit screeen.
![GPRINT Presets Edit](images/gprint-presets-edit.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+64 -51
View File
@@ -1,16 +1,16 @@
# General Installing Instructions
Make sure the following packages are installed according to your operating
systems requirements. Verify, that httpd/apache and MySQL/MariaDB are started
at system startup.
systems requirements. Verify, that httpd/apache and MySQL/MariaDB are started at
system startup.
## Required Packages for Most Operating Systems
Depending on your operating system and PHP version, certain packages are
required for Cacti. The largest variable in these requirements come with
regard to PHP and MySQL/MariaDB.
required for Cacti. The largest variable in these requirements come with regard
to PHP and MySQL/MariaDB.
Installation requirements include the packages below. The installation of these
Installation requirements include the packages below. The installation of these
packages will vary by operating system.
### Base OS
@@ -25,14 +25,14 @@ packages will vary by operating system.
- dos2unix (for spine)
- development packages (gcc, automake, autoconf, libtool,
either mysql-devel or mariadb-devel, net-snmp-devel, help2man)
- development packages (gcc, automake, autoconf, libtool, either mysql-devel or
mariadb-devel, net-snmp-devel, help2man)
(for spine)
### Database
MySQL versions to 5.7 are supported. MariaDB to 10.2 is also supported.
MySQL versions to 5.7 are supported. MariaDB to 10.2 is also supported.
- mysql
@@ -50,8 +50,8 @@ or
### PHP Modules
The installation of these modules vary by OS. Use the `php -m` command to
verify that they are installed.
The installation of these modules vary by OS. Use the `php -m` command to verify
that they are installed.
- posix
@@ -89,6 +89,15 @@ The following modules are optional, but preferred to be installed.
- com or dotnet (windows only)
### A special note for systems using PHP-FPM
Prior to starting the setup process of Cacti you should restart the PHP-FPM
Daemon to rebuild the Cache or you may recive a HTTP 500 Error
```console
systemctl restart php-fpm
```
## FreeBSD
When installing on FreeBSD you can use two ways. For both ways, cacti has a lot
@@ -104,8 +113,8 @@ prepared. Both ways have few pros and cons:
```
- FreeBSD ports - compilation could last long time, but without invariant
dependencies (See [Howto use
ports](https://www.freebsd.org/doc/handbook/ports-using.html))
dependencies (See
[Howto use ports](https://www.freebsd.org/doc/handbook/ports-using.html))
```sh
portsnap fetch extract
@@ -134,12 +143,12 @@ chmod +s /usr/local/bin/spine
## Configure PHP
Verify that the modules are installed and configured correctly. There are
several ways to do so - consult [PHP configuration
instructions](http://www.php.net/manual/en/configuration.php) for a complete
description.
several ways to do so - consult
[PHP configuration instructions](http://www.php.net/manual/en/configuration.php)
for a complete description.
It is imperative that you set the `date.timezone` in your `/etc/php.ini`, or
`/etc/phpX/apache/php.ini` and `/etc/phpX/cli/php.ini` files. Failure to do so
`/etc/phpX/apache/php.ini` and `/etc/phpX/cli/php.ini` files. Failure to do so
will result in errors after the install is complete.
Most other PHP configuration is done automatically by the base OS, so there is
@@ -148,10 +157,10 @@ no need to discuss that here.
## Configure the Webserver (Apache)
Most Linux/UNIX OS' automatically configure the Web Server to allow PHP content.
So there should be no need to provide additional configuration. However, the
So there should be no need to provide additional configuration. However, the
following section is included below for reference in the case that you are
running a UNIX version that does not properly configure the Webserver properly.
The documentation below is written specifically for RHEL and variants. So, the
The documentation below is written specifically for RHEL and variants. So, the
instructions may vary.
Find the file `/etc/httpd/conf/httpd.conf` or its equivalent and make the
@@ -180,17 +189,17 @@ DirectoryIndex index.php
## Configure MySQL/MariaDB
Set a password for the root user, and record this password. If you loose
control of this password, you may have to re-install your database server in the
case of any system disaster or recovering from a crash.
Set a password for the root user, and record this password. If you loose control
of this password, you may have to re-install your database server in the case of
any system disaster or recovering from a crash.
```sh
shell> mysqladmin --user=root password somepassword
shell> mysqladmin --user=root --password reload
```
You must also load timezone information into the database. This is required for
various plugin use. Later, you will be required to grant access to the
You must also load timezone information into the database. This is required for
various plugin use. Later, you will be required to grant access to the
`time_zone_name` table during the final installation steps.
```sh
@@ -198,8 +207,8 @@ shell> mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
```
Since Cacti 1.x is supporting internationalization (i18n), it is important that
the default character set for MySQL/MariaDB be i18n compatible. The Cacti
installer will make specific recommendations on MySQL/MariaDB settings. Follow
the default character set for MySQL/MariaDB be i18n compatible. The Cacti
installer will make specific recommendations on MySQL/MariaDB settings. Follow
those as applicable for your OS.
Galera clustering: There are several tables which are set to use the MEMORY
@@ -259,17 +268,17 @@ back into rotation.
mysql> FLUSH PRIVILEGES;
```
Note that if your `root` (or equivalent) user does not have `SUPER` permissions,
it may still be possible to `GRANT SELECT` privileges to the Cacti user via an
`INSERT INTO mysql.tables_priv`.
Note that if your `root` (or equivalent) user does not have `SUPER`
permissions, it may still be possible to `GRANT SELECT` privileges to the
Cacti user via an `INSERT INTO mysql.tables_priv`.
```sql
INSERT INTO mysql.tables_priv (Host, Db, User, Table_name, Grantor, Table_priv)
VALUES ('localhost', 'mysql', 'cactiuser', 'time_zone_name', 'root@localhost', 'Select');
```
```sql
INSERT INTO mysql.tables_priv (Host, Db, User, Table_name, Grantor, Table_priv)
VALUES ('localhost', 'mysql', 'cactiuser', 'time_zone_name', 'root@localhost', 'Select');
```
5. Edit `include/config.php` and specify the database type, name, host, user
and password for your Cacti configuration.
5. Edit `include/config.php` and specify the database type, name, host, user and
password for your Cacti configuration.
```php
$database_type = "mysql";
@@ -287,28 +296,27 @@ back into rotation.
shell> chown -R cactiuser rra/ log/ cache/
```
(Enter a valid username for *cactiuser*, this user will also be used in the
(Enter a valid username for _cactiuser_, this user will also be used in the
next step for data gathering.)
7. Create your cron task file or systemd units file
Starting with Cacti 1.2.16, you have the option to use either the
legacy Crontab entry, or an optional cactid units file and server
to run your Cacti pollers.
Starting with Cacti 1.2.16, you have the option to use either the legacy
Crontab entry, or an optional cactid units file and server to run your Cacti
pollers.
For Crontab use, follow the instructions below:
Create and edit `/etc/cron.d/cacti` file.
Make sure to setup the correct path to poller.php
Create and edit `/etc/cron.d/cacti` file. Make sure to setup the correct path
to poller.php
```console
*/5 * * * * apache php <path_cacti>/poller.php &>/dev/null
```
For systemd unit's file install, you will need to modify the
included units file to following your install location
and desired user and group's to run the Cacti poller as.
To complete the task, follow the procedure below:
For systemd unit's file install, you will need to modify the included units
file to following your install location and desired user and group's to run
the Cacti poller as. To complete the task, follow the procedure below:
```console
vim <path_cacti>/service/cactid.service (edit the path)
@@ -319,8 +327,8 @@ back into rotation.
systemctl status cactid
```
The systemd units file makes managing a highly available Cacti
setup a bit more convenient.
The systemd units file makes managing a highly available Cacti setup a bit
more convenient.
8. During install, you will need to provide write access to the following files
and directories:
@@ -336,7 +344,7 @@ back into rotation.
`http://<your-server>/cacti/`
Log in the with a username/password of *admin*. You will be required to
Log in the with a username/password of _admin_. You will be required to
change this password immediately. Make sure to fill in all of the path
variables carefully and correctly on the following screen.
@@ -364,7 +372,7 @@ it. The configuration file may be placed in the same directory as spine itself
or at /etc/spine.conf.
```ini
DB_Host 127.0.0.1 or hostname (not localhost)
DB_Host 127.0.0.1 or hostname (not localhost)
DB_Database cacti
DB_User cactiuser
DB_Password cacti
@@ -373,9 +381,12 @@ DB_Port 3306
### Considerations when using Proxys in front of Cacti (Cacti 1.2.23+)
For optimal security, only specify the HTTP headers that are set by your proxy software to prevent unauthorized access. These can be set by editing the following section of config.php
For optimal security, only specify the HTTP headers that are set by your proxy
software. to prevent unauthorized access, These can be set by editing the
following section of config.php
```
```php
/*
* Allow the use of Proxy IPs when searching for client
* IP to be used
*
@@ -400,7 +411,9 @@ For optimal security, only specify the HTTP headers that are set by your proxy s
* 'REMOTE_ADDR',
*/
$proxy_headers = null;
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -58,4 +58,4 @@ will be covered in the **Graph Template** section of the manual and not
covered here.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -45,4 +45,4 @@ on the graph rules.
![Automation Graph Rules Matching Objects](images/automation-graph-rules-edit5.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+59 -28
View File
@@ -29,8 +29,10 @@ Option | Description
--- | ---
*Delete* | Remove the **Graph Template** if it's *Deletable*
*Duplicate* | Make an exact copy of the **Graph Template**
*Resize* | Make a resize decision that affects both the **Graph Template** and any **Graphs** created using this **Graph Template**
*Sync Graphs* | Update all **Graphs** using this **Graph Template** with the latest definition, adding new *Graph Items* and removing orphaned *Graph Items*
*Resize* | Make a resize decision that affects both the **Graph Template** and any
**Graphs** created using this **Graph Template**
*Sync Graphs* | Update all **Graphs** using this **Graph Template** with the
latest definition, adding new *Graph Items* and removing orphaned *Graph Items*
When Editing a **Graph Template**, there will be several sections that will
require information from the Administrator. Those sections include:
@@ -38,10 +40,20 @@ require information from the Administrator. Those sections include:
Section | Description
--- | ---
*Graph Template Items* | These items paint inside the canvas of the **Graph**
*Graph Item Inputs* | This list is created automatically when you add **Data Sources** to a **Graph Template**. However, you can also override certain **Data Template** and **Graph Template** fields by adding specifically named objects to this section as well.
*Graph Template* | Allows you to name the **Graph Template**, and whether or not you will allow multiple instances of this **Graph Template** to be used for a **Device**, and whether or not to test for valid data before allowing the creation of **Graphs**. The *Test Data Source* option is useful when you want to leverage a complex **Device Template** that contains **Graph Templates** that may not be applicable for all classes of **Devices** using the **Graph Template**.
*Common Options* | Things like Title, Vertical Label, Image Format, Height and Width, Base Value and Slope Mode
*Scaling Options* | Which determine if the Graph is auto-scaled and by what means. Determines if the Graph will have fixed upper and lower limits
*Graph Item Inputs* | This list is created automatically when you add **Data Sources**
to a **Graph Template**. However, you can also override certain **Data Template**
and **Graph Template** fields by adding specifically named objects to this
section as well.
*Graph Template* | Allows you to name the **Graph Template**, and whether or not
you will allow multiple instances of this **Graph Template** to be used for a
**Device**, and whether or not to test for valid data before allowing the creation
of **Graphs**. The *Test Data Source* option is useful when you want to leverage
complex **Device Template** that contains **Graph Templates** that may not be applicable
for all classes of **Devices** using the **Graph Template**.
*Common Options* | Things like Title, Vertical Label, Image Format,
Height and Width, Base Value and Slope Mode
*Scaling Options* | Which determine if the Graph is auto-scaled
and by what means. Determines if the Graph will have fixed upper and lower limits
*Grid Options* | Defines how the Graph canvas grid is rendered
*Axis Options* | Defines if there should be a right Axis and how it should be formatted
*Legend Options* | Defines how the Legends should be formatted
@@ -57,17 +69,35 @@ Type | Description
--- | ---
*AREA* | Place an *Area Fill* on the canvas
*AREA:STACK* | The second item of an *Area Fill* to be stacked upon the first
*COMMENT* | A written comment. Can include: &#124;host_*&#124;, &#124;query_*&#124;, &#124;input_*&#124; *Replacement Variables*
*GPRINT* | Print a numeric value from the RRDfile with an optional **CDEF** or **VDEF** and formatted using a **GPRINT Preset**.
*GPRINT:AVERAGE* | Print a numeric value from the RRDfile from the *AVERAGE* *Consolidation Function* within the RRA, modified by an optional **CDEF**, or **VDEF**, and formatted using a **GPRINT Preset**.
*GPRINT:LAST* | Print a numeric value from the RRDfile from the *LAST* *Consolidation Function* within the RRA, modified by an optional **CDEF**, or **VDEF**, and formatted using a **GPRINT Preset**.
*GPRINT:MAX* | Print a numeric value from the RRDfile from the *MAX* *Consolidation Function* within the RRA, modified by an optional **CDEF**, or **VDEF**, and formatted using a **GPRINT Preset**.
*GPRINT:MIN* | Print a numeric value from the RRDfile from the *MIN* *Consolidation Function* within the RRA, modified by an optional **CDEF**, or **VDEF**, and formatted using a **GPRINT Preset**.
*HRULE* | Draw an *Horizontal Rule* at the given point on the canvas. You can NOT use any Data Source element or an optional **CDEF** or **VDEF**, but may be able to use either a &#124;query_*&#124;, or &#124;input_*&#124; *Replacement Variable*.
*LEGEND* | Draw a *Legend* from three *GPRINTS* using the same **GPRINT Preset**, and **VDEF** or **CDEF**. The *Current*, *Average*, and *Max* *Consolidation Functions* are used.
*LEGEND_CAMM* | Draw a *Legend* from four *GPRINTS* using the same **GPRINT_Preset**, and **VDEF** or **CDEF**. The *Current*, *Average*, "Min*, and "Max" functions are used for this *Legend*.
*LINE[1,2,3]* | Draw a 1, 2, 3 or used defined thickness pixel *Line* from the RRDfile onto the canvas, modified by an optional **CDEF**, or **VDEF**.
*LINE:STACK* | Stack a Line of a user defined thickness on top of another *Line*, modified by an optional **CDEF**, or **VDEF**.
*COMMENT* | A written comment. Can include: &#124;host_*&#124;, &#124;query_*&#124;,
&#124;input_*&#124; *Replacement Variables*
*GPRINT* | Print a numeric value from the RRDfile with an optional **CDEF** or **VDEF**
and formatted using a **GPRINT Preset**.
*GPRINT:AVERAGE* | Print a numeric value from the RRDfile from the *AVERAGE*
*Consolidation Function* within the RRA, modified by an optional **CDEF**, or **VDEF**,
and formatted using a **GPRINT Preset**.
*GPRINT:LAST* | Print a numeric value from the RRDfile from the *LAST* *Consolidation
Function*within the RRA, modified by an optional **CDEF**, or **VDEF**,
and formatted using a **GPRINT Preset**.
*GPRINT:MAX* | Print a numeric value from the RRDfile from the *MAX* *Consolidation
Function* within the RRA, modified by an optional **CDEF**, or **VDEF**, and formatted
using a **GPRINT Preset**.
*GPRINT:MIN* | Print a numeric value from the RRDfile from the *MIN* *Consolidation
Function* within the RRA, modified by an optional **CDEF**, or **VDEF**,
and formatted using a **GPRINT Preset**.
*HRULE* | Draw an *Horizontal Rule* at the given point on the canvas.
You can NOT use any Data Source element or an optional **CDEF** or **VDEF**,
but may be able to use either a &#124;query_*&#124;, or &#124;input_*&#124;
*Replacement Variable*.
*LEGEND* | Draw a *Legend* from three *GPRINTS* using the same **GPRINT Preset**,
and **VDEF** or **CDEF**. The *Current*, *Average*, and *Max* *Consolidation Functions*
are used.*LEGEND_CAMM* | Draw a *Legend* from four *GPRINTS* using the same **GPRINT_Preset**,
and **VDEF** or **CDEF**. The *Current*, *Average*, "Min*, and "Max"
functions are used for this *Legend*.
*LINE[1,2,3]* | Draw a 1, 2, 3 or used defined thickness pixel *Line* from the
RRDfile onto the canvas, modified by an optional **CDEF**, or **VDEF**.
*LINE:STACK* | Stack a Line of a user defined thickness on top of another *Line*,
modified by an optional **CDEF**, or **VDEF**.
*TEXTALIGN* | Modify future text using the alignment provided.
*VRULE* | Place a *Vertical Rule* on the canvas of a specific color and time position.
@@ -79,7 +109,7 @@ mind when creating a **Graph Template**.
## Graph Template - General and Common Options
- **Name** - This is the name that you provide to the **Graph Template**. Since Cacti
- **Name** - This is the name that you provide to the **Graph Template**.Since Cacti
does not presently have the concept of **Graph Template Class** many authors will
prefix the **Name** with a **Class** prefix like *Net-SNMP* for example.
@@ -87,17 +117,18 @@ prefix the **Name** with a **Class** prefix like *Net-SNMP* for example.
than one instance of the Template. This will allow you to select the **Graph Template**
from the **Create** option of **New Graphs** interface more than once.
- **Test Data Sources** - This option will test that the **Data Source** returns good
data before allowing the creation of the **Graph**. You should be aware that if
your **Data Source** calls a script that runs for a long time, selecting this option
can really slow the **Graph** creation process. However, it's quite useful if
you have a hybrid **Device Template** that includes a myriad of **Graph Templates**
that may not work with all **Devices** that you create using the **Device Template**.
- **Test Data Sources** - This option will test that the **Data Source** returns
good data before allowing the creation of the **Graph**.
You should be aware that if your **Data Source** calls a script that runs
for a long time, selecting this option can really slow the **Graph** creation process.
However, it's quite useful if you have a hybrid **Device Template** that includes
a myriad of **Graph Templates** that may not work with all **Devices**
that you create using the **Device Template**.
Under the *Common Options*, for each **Graph Template** you will specify patterns
for the *Graph Name*, assign it's *Veritcal Label*, specify the *Width* and *Height*,
and *Image Format* for the resulting **Graph**. The *Base Value* is important as some
units of measure can be for example: MB (for Mega Bytes - 1024) and MiB (for
for the *Graph Name*, assign it's *Veritcal Label*, specify the *Width* and *Height*,
and *Image Format* for the resulting **Graph**. The *Base Value* is important
as some units of measure can be for example: MB (for Mega Bytes - 1024) and MiB (for
Mega integer Bytes - 1000). Lastly, the *Slope Mode* gives the resulting
**Graphs** a smoother look.
@@ -134,4 +165,4 @@ available in Cacti prior to Cacti 1.0.
![Legend Options](images/graph-templates-edit6.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+47 -45
View File
@@ -1,72 +1,74 @@
# Creating a Graph for a Single SNMP OID
When dealing with SNMP-enabled **Devices**, there are often times when you want to
graph the value of a single OID. This tutorial explains how to do this in
When dealing with SNMP-enabled **Devices**, there are often times when you want
to graph the value of a single OID. This tutorial explains how to do this in
Cacti. It also assumes that you have the "SNMP - Generic OID Template" **Graph
Template** which is available in the **Generic SNMP Device Package**.
If you do not see this **Graph Template** listed under **Graph Templates**,
install the **Generic SNMP Device Package** using the `import_package.php`
command line script located in Cacti's cli directory.
Template** which is available in the **Generic SNMP Device Package**. If you do
not see this **Graph Template** listed under **Graph Templates**, install the
**Generic SNMP Device Package** using the `import_package.php` command line
script located in Cacti's cli directory.
To start the process of creating a new graph for your OID, click go to
`Console > Create > New Graphs`, and from there find the **Device**
you would like to add the **Graph** to.
`Console > Create > New Graphs`, and from there find the **Device** you would
like to add the **Graph** to.
From the image below, you can see the **New Graphs** interface.
![Graphs New](images/graphs-new.png)
In this image, only the **Graph Template** based **Graph Templates** are displayed.
Had the `Graph Types` been switched to any of the **Data Query** based `Graph Types`
the interface would look a bit different.
In this image, only the **Graph Template** based **Graph Templates** are
displayed. Had the `Graph Types` been switched to any of the **Data Query**
based `Graph Types` the interface would look a bit different.
From that Interface, to create a `Generic SNMP OID` based Graph, you need to first
select it from the `Select a graph type to create` drop-down. Once you have selected
it, you may press the `Create` button, at which point in time, you will see the
image below.
From that Interface, to create a `Generic SNMP OID` based Graph, you need to
first select it from the `Select a graph type to create` drop-down. Once you
have selected it, you may press the `Create` button, at which point in time, you
will see the image below.
![Graphs New](images/graphs-new-generic-oid.png)
From this interface, you must define various attributes for your resulting **Graph**
as shown in the table below.
From this interface, you must define various attributes for your resulting
**Graph** as shown in the table below.
###### Table 10-1. Field Description: SNMP - Generic OID Template
Name | Description
--- | ---
(Graph) Title | The title that is to be used for the new graph. It is generally a good idea to keep `|host_description|` in the title, as to make the graph easier to identify later.
(Graph) Vertical Label | The text that will be printed along the y-axis of the graph. It is generally used to describe units, such as 'bytes' or 'percent'.
(Graph Items) Legend Color | The color that will be used to represent the data on the graph.
(Graph Items) Opacity/Alpha Channel | This optionally provides an opacity (not available with RRDtool-1.0.x) for a colored item.
(Graph Items) Legend Text | The text that will be used to describe the data on the graph legend.
(Data Source) Name | The title that is to be used for the new data source. It is generally a good idea to keep |host_description| in the title, as to make the data source easier to identify later.
(Data Source) Maximum Value [snmp_oid] | The maximum value that will be accepted from the OID. Make sure you choose a value that is reasonable for the data you are trying to graph because anything larger than the maximum will be ignored. If you are graphing a percentage, you should use '100' as the value should never exceed this.
(Data Source) Data Source Type [snmp_oid] | How the data from the OID should be stored by RRDtool and interpreted on the graph. If the value of the OID represents the actual data, you should use GAUGE for this field. If the OID value is a constantly incremented number, you should use COUNTER for this field. The two remaining field values, DERIVE and ABSOLUTE can be ignored in most situations.
(Custom Data) OID | The actual SNMP OID to graph. It is typically a good idea to enter the number OID here as opposed to using MIB names. For instance, to get the number of open files on a Netware server, you would use ".1.3.6.1.4.1.23.2.28.2.7.0" as the OID.
| Name | Description |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| (Graph) Title | The title that is to be used for the new graph. It is generally a good idea to keep `host_description` in the title, as to make the graph easier to identify later. |
| (Graph) Vertical Label | The text that will be printed along the y-axis of the graph. It is generally used to describe units, such as 'bytes' or 'percent'. |
| (Graph Items) Legend Color | The color that will be used to represent the data on the graph. |
| (Graph Items) Opacity/Alpha Channel | This optionally provides an opacity (not available with RRDtool-1.0.x) for a colored item. |
| (Graph Items) Legend Text | The text that will be used to describe the data on the graph legend. |
| (Data Source) Name | The title that is to be used for the new data source. It is generally a good idea to keep `host_description` in the title, as to make the data source easier to identify later. |
| (Data Source) Maximum Value [snmp_oid] | The maximum value that will be accepted from the OID. Make sure you choose a value that is reasonable for the data you are trying to graph because anything larger than the maximum will be ignored. If you are graphing a percentage, you should use '100' as the value should never exceed this. |
| (Data Source) Data Source Type [snmp_oid] | How the data from the OID should be stored by RRDtool and interpreted on the graph. If the value of the OID represents the actual data, you should use GAUGE for this field. If the OID value is a constantly incremented number, you should use COUNTER for this field. The two remaining field values, DERIVE and ABSOLUTE can be ignored in most situations. |
| (Custom Data) OID | The actual SNMP OID to graph. It is typically a good idea to enter the number OID here as opposed to using MIB names. For instance, to get the number of open files on a Netware server, you would use ".1.3.6.1.4.1.23.2.28.2.7.0" as the OID. |
So, based upon your specific OID that you are graphing, You will need
to fill out these fields before the new graph can be created properly.
So, based upon your specific OID that you are graphing, You will need to fill
out these fields before the new graph can be created properly.
When finished filling in values for these fields, click the Create button. Your
new **Graph** can now be accessed through the
`Cosole > Management > Graphs` menu pick.
new **Graph** can now be accessed through the `Cosole > Management > Graphs`
menu pick.
> **NOTE**: When comparing the Table above, to the image, you will see
> that the `Opacity/Alpha Channel` pick is missing from the interface.
> To add it, you simply need > to edit the `Generic SNMP OID`
> **Graph Template**, add a new **Graph Item Input**
> override to the Alpha/Opacity on the Graph Template as shown below.
> That topic will be covered in the **Graph Template** section of
> **NOTE**: When comparing the Table above, to the image, you will see that the
> `Opacity/Alpha Channel` pick is missing from the interface. To add it, you
> simply need > to edit the `Generic SNMP OID` > **Graph Template**, add a new
> **Graph Item Input** override to the Alpha/Opacity on the Graph Template as
> shown below. That topic will be covered in the **Graph Template** section of
> the manual though.
![Graphs New](images/graphs-new-generic-oid-alpha.png)
#### Important Note on graphing single OID's with Cacti
In order to ensure that Spine and cmd.php will process single OID's correctly,
They should be written using numeric format separated by dots, such as `1.3.6.1.4.1.9.9.97.`
At this time, ASN's (named OID's) such as `enterprise.9.9.97` (Cisco Switch) or
`enterprises.cisco.ciscoMgnt.ciscoSwitchEngineMIB` are not supported.
> **Important Note**:
>
> When graphing single OID's with Cacti, to ensure Spine and cmd.php will
> process single OID's correctly, they should be written using numeric format
> separated by dots, such as `1.3.6.1.4.1.9.9.97.`
>
> At this time, ASN's (named OID's) such as `enterprise.9.9.97` (Cisco Switch)
> or `enterprises.cisco.ciscoMgnt.ciscoSwitchEngineMIB` are not supported.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -25,4 +25,4 @@ template will also be updated.
![Graph template options](images/graph-template-options.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+67 -66
View File
@@ -1,14 +1,14 @@
# Data Input Methods - From Script Output to Complete Graph
In this How-To we will take you through the process of creating a script
and then from the scripts output generate a complete **Graph Template**
that you can apply to your Cacti system. You should be able to reproduce
this process regardless of the script type in question.
In this How-To we will take you through the process of creating a script and
then from the scripts output generate a complete **Graph Template** that you can
apply to your Cacti system. You should be able to reproduce this process
regardless of the script type in question.
## Data Input Method returning a single value
Lets start with a simple script that takes a hostname or IP address as input
parameter returning a single value.
parameter returning a single value.
`<path_cacti>/scripts/ping.pl`:
@@ -27,16 +27,16 @@ close(PROCESS);
$ping =~ m/(.*time=)(.*) (ms|usec)/;
if ($2 == "") {
print "U"; # avoid cacti errors, but do not fake RRDtool stats
print "U"; # avoid cacti errors, but do not fake RRDtool stats
}elsif ($3 eq "usec") {
print $2/1000; # re-calculate in units of "ms"
print $2/1000; # re-calculate in units of "ms"
}else{
print $2;
print $2;
}
```
To define this script as a **Data Input Method** to Cacti go to **Data
Input Methods** and click **Add**. You should see:
To define this script as a **Data Input Method** to Cacti go to **Data Input
Methods** and click **Add**. You should see:
![Data Input Methods New](images/r-dim1-0.png)
@@ -80,9 +80,9 @@ 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 **|host_description|** is taken from the actual **Device**. This is to
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
**|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
@@ -154,7 +154,7 @@ drop down. Click the plus (+) glyph to see:
By default, the **Graph Template** is added and shown as **Is Being Graphed**.
The reason for this is that Cacti now automatically creates **Graphs**
automatically, unless disabled. If the **Graph Template** shows **Not Being
automatically, unless disabled. If the **Graph Template** shows **Not Being
Graphed**, you can create the **Graph** by pressing the **Create Graphs** at the
top of the **Devices** page. Click this link to see:
@@ -173,7 +173,7 @@ This will automatically
- Create the needed **Data Source Description** from the **Data Template**.
Again, you will find the Hosts name replaced for |host_description|
- Create the needed RRDfile with definitions from the **Data Template**. The
- Create the needed RRDfile with definitions from the **Data Template**. The
name of this file is derived from the Host and the **Data Template** in
conjunction with an auto-incrementing number.
@@ -189,7 +189,7 @@ may look like:
## Walkthrough: Script with more Output Parameters
The script below will be implemented in perl. Please note that any supported
The script below will be implemented in perl. Please note that any supported
language is supported using Cacti from direct command execution to scripts
written in perl, python, php, bash, etc.
@@ -212,14 +212,14 @@ my $in_version = $ARGV[3] if defined $ARGV[3];
# usage notes
if (
( ! defined $in_hostname ) ||
( ! defined $in_port ) ||
( ! defined $in_community ) ||
( ! defined $in_version )
( ! defined $in_hostname ) ||
( ! defined $in_port ) ||
( ! defined $in_community ) ||
( ! defined $in_version )
) {
print "usage:\n\n
$0 &lt;host&gt; &lt;port&gt; &lt;community&gt; &lt;version&gt;\n\n";
exit;
print "usage:\n\n
$0 &lt;host&gt; &lt;port&gt; &lt;community&gt; &lt;version&gt;\n\n";
exit;
}
# list all OIDs to be queried
@@ -229,51 +229,51 @@ my $udpOutDatagrams = ".1.3.6.1.2.1.7.4.0";
# get information via SNMP
# create session object
my ($session, $error) = Net::SNMP->session(
-hostname => $in_hostname,
-port => $in_port,
-version => $in_version,
-community => $in_community,
# add more parameters if there's a need for them:
# [-localaddr => $localaddr,]
# [-localport => $localport,]
# [-nonblocking => $boolean,]
# [-domain => $domain,]
# [-timeout => $seconds,]
# [-retries => $count,]
# [-maxmsgsize => $octets,]
# [-translate => $translate,]
# [-debug => $bitmask,]
# [-username => $username,] # v3
# [-authkey => $authkey,] # v3
# [-authpassword => $authpasswd,] # v3
# [-authprotocol => $authproto,] # v3
# [-privkey => $privkey,] # v3
# [-privpassword => $privpasswd,] # v3
# [-privprotocol => $privproto,] # v3
-hostname => $in_hostname,
-port => $in_port,
-version => $in_version,
-community => $in_community,
# add more parameters if there's a need for them:
# [-localaddr => $localaddr,]
# [-localport => $localport,]
# [-nonblocking => $boolean,]
# [-domain => $domain,]
# [-timeout => $seconds,]
# [-retries => $count,]
# [-maxmsgsize => $octets,]
# [-translate => $translate,]
# [-debug => $bitmask,]
# [-username => $username,] # v3
# [-authkey => $authkey,] # v3
# [-authpassword => $authpasswd,] # v3
# [-authprotocol => $authproto,] # v3
# [-privkey => $privkey,] # v3
# [-privpassword => $privpasswd,] # v3
# [-privprotocol => $privproto,] # v3
);
# on error: exit
if (!defined($session)) {
printf("ERROR: %s.\n", $error);
exit 1;
printf("ERROR: %s.\n", $error);
exit 1;
}
# perform get requests for all wanted OIDs
my $result = $session->get_request(
-varbindlist => [$udpInDatagrams, $udpOutDatagrams]
-varbindlist => [$udpInDatagrams, $udpOutDatagrams]
);
# on error: exit
if (!defined($result)) {
printf("ERROR: %s.\n", $session->error);
$session->close;
exit 1;
printf("ERROR: %s.\n", $session->error);
$session->close;
exit 1;
}
# print results
printf("udpInDatagrams:%s udpOutDatagrams:%s", # <<< cacti requires this format!
$result->{$udpInDatagrams},
$result->{$udpOutDatagrams},
$result->{$udpInDatagrams},
$result->{$udpOutDatagrams},
);
$session->close;
@@ -286,16 +286,16 @@ It should produce following output, when executed from command line:
udpInDatagrams:10121 udpOutDatagrams:11102
```
Where “public” would be replaced by your community string. Those input
Where “public” would be replaced by your community string. Those input
parameters again are controlled by the `Input Fields` in Cacti and the output
from the script will be mapped to `Output Fields`. If you wish to return
from the script will be mapped to `Output Fields`. If you wish to return
multiple output values, they must be space delimited name value pairs in the
form of nameA:valueA nameB:valueB ...
## The Data Input Method
To define this script as a **Data Input Method** to Cacti go to **Data
Input Methods** and click the plus (+) glyph.
To define this script as a **Data Input Method** to Cacti go to **Data Input
Methods** and click the plus (+) glyph.
![More Scripts dim 1](images/dim-add01.preview.png)
@@ -372,29 +372,29 @@ But we now provide the name of **udpInPackets**, enter a **Maximum value** of
![Data Template - Two DS, Step1](images/dim-add13.preview.png)
Then save and find with the exception that the *Output Field* will be set to
*None Selected*. Therefore, before adding the second *Data Source Item*, make
sure you select the *Output Field* of *udpInDatagrams* and press the Save button
Then save and find with the exception that the _Output Field_ will be set to
_None Selected_. Therefore, before adding the second _Data Source Item_, make
sure you select the _Output Field_ of _udpInDatagrams_ and press the Save button
to create the association.
![Data Template - Two DS, Step2](images/dim-add14.preview.png)
Then, add the second **Data Source** by pressing the plus (+) glyph and
providing data for *udpOutPackets*. Pay attention to select the correct *Output
Field* defined by the **Data Input Method** as we did with the *udpInDatagrams*.
providing data for _udpOutPackets_. Pay attention to select the correct _Output
Field_ defined by the **Data Input Method** as we did with the _udpInDatagrams_.
![Data Template - Two DS, Step3](images/dim-add15.preview.png)
To deactivate maximum checking, enter 'U', else the desired number. Do not
forget to select the correct *Data Source Type* and the *Output Field* as
forget to select the correct _Data Source Type_ and the _Output Field_ as
before.
## The Graph Template
Most of this task of creating a **Graph Template** has already been covered in
our example. You will basically create a new **Graph Template**, provide a
*Line* or an *Area Fill* followed by a *Legend* for both the *udpInDatagrams*
and *udpOutDatagrams*. The result of those actions will be the image below:
our example. You will basically create a new **Graph Template**, provide a
_Line_ or an _Area Fill_ followed by a _Legend_ for both the _udpInDatagrams_
and _udpOutDatagrams_. The result of those actions will be the image below:
![Graph Template - Two DS, Step4](images/dim-add16.preview.png)
@@ -403,4 +403,5 @@ After you have created your **Graph Template** you can proceed to Add the
the **Graph** for you, or to manually add it from the **New Graphs** menu pick.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -210,4 +210,4 @@ interfaces.mib.1.1.1.1.1
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -46,4 +46,4 @@ The next 32 digits are a random number.
For the example above, this template was exported with Cacti 0.8.7d.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -197,4 +197,4 @@ Pressing the *Set Default* button will set the selected *Graph Type* to be the
default for this **Data Query**.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+151 -148
View File
@@ -1,7 +1,7 @@
# SNMP Data Query Walkthrough
This walkthrough will show you how to implement a new SNMP Data Query.
Assuming, you know the SNMP table, the next steps show how to proceed.
This walkthrough will show you how to implement a new SNMP Data Query. Assuming,
you know the SNMP table, the next steps show how to proceed.
## Building Raw XML File
@@ -11,26 +11,26 @@ The starting point will be snmptable for a well know table of the HOSTS MIB:
snmptable -c <community> -v 1 <host> HOST-RESOURCES-MIB::hrStorageTable
SNMP table: HOST-RESOURCES-MIB::hrStorageTable
hrStorageIndex hrStorageType hrStorageDescr hrStorageAllocationUnits hrStorageSize hrStorageUsed hrStorageAllocationFailures
1 HOST-RESOURCES-TYPES::hrStorageOther Memory Buffers 1024 Bytes 1035356 59532 ?
2 HOST-RESOURCES-TYPES::hrStorageRam Real Memory 1024 Bytes 1035356 767448 ?
3 HOST-RESOURCES-TYPES::hrStorageVirtualMemory Swap Space 1024 Bytes 1048568 0 ?
4 HOST-RESOURCES-TYPES::hrStorageFixedDisk / 4096 Bytes 2209331 826154 ?
5 HOST-RESOURCES-TYPES::hrStorageFixedDisk /sys 4096 Bytes 0 0 ?
6 HOST-RESOURCES-TYPES::hrStorageFixedDisk /proc/bus/usb 4096 Bytes 0 0 ?
7 HOST-RESOURCES-TYPES::hrStorageFixedDisk /boot 1024 Bytes 102454 9029 ?
8 HOST-RESOURCES-TYPES::hrStorageFixedDisk /home 4096 Bytes 507988 446407 ?
9 HOST-RESOURCES-TYPES::hrStorageFixedDisk /usr/local 4096 Bytes 507988 17133 ?
10 HOST-RESOURCES-TYPES::hrStorageFixedDisk /var 4096 Bytes 507988 129429 ?
11 HOST-RESOURCES-TYPES::hrStorageFixedDisk /var/lib/nfs/rpc_pipefs 4096 Bytes 0 0 ?**
hrStorageIndex hrStorageType hrStorageDescr hrStorageAllocationUnits hrStorageSize hrStorageUsed hrStorageAllocationFailures
1 HOST-RESOURCES-TYPES::hrStorageOther Memory Buffers 1024 Bytes 1035356 59532 ?
2 HOST-RESOURCES-TYPES::hrStorageRam Real Memory 1024 Bytes 1035356 767448 ?
3 HOST-RESOURCES-TYPES::hrStorageVirtualMemory Swap Space 1024 Bytes 1048568 0 ?
4 HOST-RESOURCES-TYPES::hrStorageFixedDisk / 4096 Bytes 2209331 826154 ?
5 HOST-RESOURCES-TYPES::hrStorageFixedDisk /sys 4096 Bytes 0 0 ?
6 HOST-RESOURCES-TYPES::hrStorageFixedDisk /proc/bus/usb 4096 Bytes 0 0 ?
7 HOST-RESOURCES-TYPES::hrStorageFixedDisk /boot 1024 Bytes 102454 9029 ?
8 HOST-RESOURCES-TYPES::hrStorageFixedDisk /home 4096 Bytes 507988 446407 ?
9 HOST-RESOURCES-TYPES::hrStorageFixedDisk /usr/local 4096 Bytes 507988 17133 ?
10 HOST-RESOURCES-TYPES::hrStorageFixedDisk /var 4096 Bytes 507988 129429 ?
11 HOST-RESOURCES-TYPES::hrStorageFixedDisk /var/lib/nfs/rpc_pipefs 4096 Bytes 0 0 ?**
```
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
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 looking at the MIB file, simply perform
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
looking at the MIB file, simply perform
```console
snmpwalk -c <community> -v 1 -On <host> HOST-RESOURCES-MIB::hrStorageTable|more
@@ -54,33 +54,33 @@ The first index is `.1.3.6.1.2.1.25.2.3.1.1.1`, but the Index Base is
```xml
<interface>
<name>Get hrStoragedTable Information</name>
<description>Get SNMP based Partition Information out of hrStorageTable</description>
<index_order>hrStorageDescr:hrStorageIndex</index_order>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<name>Get hrStoragedTable Information</name>
<description>Get SNMP based Partition Information out of hrStorageTable</description>
<index_order>hrStorageDescr:hrStorageIndex</index_order>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<fields>
<hrStorageIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hrStorageIndex>
</fields>
<fields>
<hrStorageIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hrStorageIndex>
</fields>
</interface>
```
Lets talk about the header elements
Field | Description
--- | ---
Name | Short Name; choose your own one if you want
Description | Long Name
index_order | tells us, which field shall be selected to index on; evaluated from left to right
index_order_type | numeric instead of alphabetic sorting
oid_index | the index of the table
| Field | Description |
| ---------------- | --------------------------------------------------------------------------------- |
| Name | Short Name; choose your own one if you want |
| Description | Long Name |
| index_order | tells us, which field shall be selected to index on; evaluated from left to right |
| index_order_type | numeric instead of alphabetic sorting |
| oid_index | the index of the table |
There are more header elements, but for sake of simplification, we'll stick to
that for now.
@@ -92,13 +92,13 @@ more fields, each beginning with `<field_description>` and ending with
`</field_description>`. It is recommended but not necessary to take the textual
representation of the OID or an abbreviation of that.
Field | Description
--- | ---
Name | Short Name
Method | Walk or get (representing snmpwalk or snmpget to fetch the values)
Source | Value = take the value of that OID as the requested value. Sounds ugly, but there are more options that we won't need for the purpose of this example
Direction | Input (for values that may be printed as COMMENTs or the like). Output (for values that shall be graphed, e.g. COUNTERs or GAUGEs).
OID | the real OID as numeric representation
| Field | Description |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Short Name |
| Method | Walk or get (representing snmpwalk or snmpget to fetch the values) |
| Source | Value = take the value of that OID as the requested value. Sounds ugly, but there are more options that we won't need for the purpose of this example |
| Direction | Input (for values that may be printed as COMMENTs or the like). Output (for values that shall be graphed, e.g. COUNTERs or GAUGEs). |
| OID | the real OID as numeric representation |
Now save this file and lets turn to cacti to implement this one. First, go to
**Data Queries** to see
@@ -114,16 +114,15 @@ and don't forget to choose **Get SNMP Data (indexed)**. **Create** to see
![SNMP Table 3 - Data Query](images/dq-03.preview.png)
It has now **Successfully located XML file**. But this does not mean that there
are no errors. So lets go on with that. Turn to the **Device** you want to
query and add the new **Data Query** as shown:
are no errors. So lets go on with that. Turn to the **Device** you want to query
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. When done, see the results as
**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.
When done, see the results as
![SNMP Table 2 - Device](images/dev-02.preview.png)
@@ -148,43 +147,43 @@ must.
```xml
<interface>
<name>Get hrStoragedTable Information</name>
<description>Get SNMP based Partition Information out of hrStorageTable</description>
<index_order>hrStorageDescr:hrStorageIndex</index_order>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<name>Get hrStoragedTable Information</name>
<description>Get SNMP based Partition Information out of hrStorageTable</description>
<index_order>hrStorageDescr:hrStorageIndex</index_order>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<fields>
<hrStorageIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hrStorageIndex>
<hrStorageType>
<name>Type</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.2</oid>
<fields>
<hrStorageIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hrStorageIndex>
<hrStorageType>
<name>Type</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.2</oid>
</hrStorageType>
<hrStorageDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.3</oid>
</hrStorageDescr>
<hrStorageAllocationUnits>
<name>Allocation Units (Bytes)</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.4</oid>
</hrStorageAllocationUnits>
</fields>
</hrStorageType>
<hrStorageDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.3</oid>
</hrStorageDescr>
<hrStorageAllocationUnits>
<name>Allocation Units (Bytes)</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.4</oid>
</hrStorageAllocationUnits>
</fields>
</interface>
```
@@ -198,13 +197,13 @@ complete OID `.1.3.6.1.2.1.25.2.3.1.3.1.`
Please notice, that all fields that will yield descriptive columns only take
`<direction>input</direction>`
If you have completed your work, turn to the cacti web interface and select
your host from the **Devices** list to see:
If you have completed your work, turn to the cacti web interface and select your
host from the **Devices** list to see:
![SNMP Table 3 - Devices](images/dev-10.preview.png)
Select the little green circle next to our SNMP XML to update your last
changes. Then you'll see something like:
Select the little green circle next to our SNMP XML to update your last changes.
Then you'll see something like:
![SNMP Table 4 - Devices](images/dev-11.preview.png)
@@ -216,9 +215,9 @@ And clicking **Create Graphs for this host** will result in
![SNMP Table 6 - Devices](images/dev-13.preview.png)
You're not supposed to really create graphs at this moment, cause the XML is
not yet complete. And you'll notice, that the second column does not present
very useful information. So it may be omitted in later steps.
You're not supposed to really create graphs at this moment, cause the XML is not
yet complete. And you'll notice, that the second column does not present very
useful information. So it may be omitted in later steps.
## Getting the Output Values
@@ -228,49 +227,49 @@ XML field descriptions, see:
```xml
<interface>
<name>Get hrStoragedTable Information</name>
<description>Get SNMP based Partition Information out of hrStorageTable</description>
<index_order>hrStorageDescr:hrStorageIndex</index_order>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<name>Get hrStoragedTable Information</name>
<description>Get SNMP based Partition Information out of hrStorageTable</description>
<index_order>hrStorageDescr:hrStorageIndex</index_order>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>
<fields>
<hrStorageIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hrStorageIndex>
<hrStorageDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.3</oid>
</hrStorageDescr>
<hrStorageAllocationUnits>
<name>Allocation Units (Bytes)</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.4</oid>
</hrStorageAllocationUnits>
<hrStorageSize>
<name>Total Size (Units)</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.5</oid>
</hrStorageSize>
<hrStorageUsed>
<name>Used Space (Units)</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.6</oid>
</hrStorageUsed>
</fields>
<fields>
<hrStorageIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</hrStorageIndex>
<hrStorageDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.3</oid>
</hrStorageDescr>
<hrStorageAllocationUnits>
<name>Allocation Units (Bytes)</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.4</oid>
</hrStorageAllocationUnits>
<hrStorageSize>
<name>Total Size (Units)</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.5</oid>
</hrStorageSize>
<hrStorageUsed>
<name>Used Space (Units)</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.6</oid>
</hrStorageUsed>
</fields>
</interface>
```
@@ -289,15 +288,16 @@ 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.
---
Note: Don't forget to set `<direction>output</direction>` for all
variables/fields, that should be stored in RRDfiles and be graphed!. This is
the mistake that occurs most often.
variables/fields, that should be stored in RRDfiles and be graphed!. This is the
mistake that occurs most often.
### Defining the Data Template
The Data Template will define, how the data is retrieved by the XML Query is
saved. For more information about the principles of operation, please see
Common Tasks. Please go to **Data Templates** and **Add**:
saved. For more information about the principles of operation, please see Common
Tasks. Please go to **Data Templates** and **Add**:
![SNMP Table 1 - Data Template](images/dt-01.preview.png)
@@ -313,13 +313,13 @@ see:
![SNMP Table 3 - Data Template](images/dt-03.preview.png)
and **New** or the plus sign on the **Data Source Item** panel.
Now enter the second **Data Source Item**:
and **New** or the plus sign on the **Data Source Item** panel. Now enter the
second **Data Source Item**:
![SNMP Table 4 - Data Template](images/dt-04.preview.png)
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
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**
![SNMP Table 5 - Data Template](images/dt-05.preview.png)
@@ -443,7 +443,8 @@ By
</hrStorageAllocationUnits>
```
To prove this, go to your device and again **Verbose Query** our Data Query to see:
To prove this, go to your device and again **Verbose Query** our Data Query to
see:
![Data Query Debug Info](images/dev-30.png)
@@ -471,13 +472,15 @@ Now the Graph looks like
![Graph image](images/graph-10.png)
Please find the example resources below. Save `hrStorageTable.xml`
into `./resource/snmp_queries` and import the Graph Template from
Please find the example resources below. Save `hrStorageTable.xml` into
`./resource/snmp_queries` and import the Graph Template from
`cacti_graph_template_host_mib_hrstoragetable.xml`.
[Cacti Graph Template Host MIB hrStorageTable](resource/xml/cacti_graph_template_host_mib_hrstoragetable.xml)
[hrStorageTable](resource/xml/hrStorageTable.xml) download and store into `resource/snmp_queries`.
[hrStorageTable](resource/xml/hrStorageTable.xml) download and store into
`resource/snmp_queries`.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -106,4 +106,4 @@ In Cacti, create a new device like that :
Voila ! Your target server is graphed by Cacti :)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+244 -242
View File
@@ -1,36 +1,36 @@
# Script Data Query Walkthrough
Goal of this HowTo will be to show the **principles of writing a Script
Query**, including script, xml and all needed templates. Why should you create
such a thing? Suppose, your target features some indexed readings, that are
**not** available via SNMP but by some other method (e.g. wget/cgi, ssh, NRPE,
…). Writing a Script Data Queries works very much the same way as SNMP Data
Queries. But nevertheless, I'll take you through all of the steps now.
Goal of this HowTo will be to show the **principles of writing a Script Query**,
including script, xml and all needed templates. Why should you create such a
thing? Suppose, your target features some indexed readings, that are **not**
available via SNMP but by some other method (e.g. wget/cgi, ssh, NRPE, …).
Writing a Script Data Queries works very much the same way as SNMP Data Queries.
But nevertheless, I'll take you through all of the steps now.
The example uses PHP. Why PHP? First, it's easier to copy stuff from already
existing PHP scripts. Second, it would be possible to use cacti functions. It
should be possible to imagine, how this works with other programming languages.
Strictly speaking, I'm not that PHP expert. So be patient with me.
Please pay attention. This HowTo will not explain how to write a **Script
Server Data Query** (yes, there is such a thing!). It would not introduce that
many changes. But this will be left to some other HowTo.
Please pay attention. This HowTo will not explain how to write a **Script Server
Data Query** (yes, there is such a thing!). It would not introduce that many
changes. But this will be left to some other HowTo.
Personally, my primary goal was to use an example, that all users should be
able to copy to execute each and every step on its own. Unfortunately, there
seems to be no example, that is common enough and interesting at the same time.
So I'm sorry to announce, that this HowTo will show “Interface Traffic Data
Gathering”. Yes, I know, this is not that new. And surely, it will not be as
fast as pure SNMP. So, to my shame, I suppose that this will never make it into
any production environment. But, again, this is not the primary goal.
Personally, my primary goal was to use an example, that all users should be able
to copy to execute each and every step on its own. Unfortunately, there seems to
be no example, that is common enough and interesting at the same time. So I'm
sorry to announce, that this HowTo will show “Interface Traffic Data Gathering”.
Yes, I know, this is not that new. And surely, it will not be as fast as pure
SNMP. So, to my shame, I suppose that this will never make it into any
production environment. But, again, this is not the primary goal.
Before starting the work, I feel encouraged to point out a drawback of this
approach. Cacti will start a PHP instance, each time it has to fetch a value
from the target device. This is not that fast, obviously. And it will not
prosper from the performance boost when switching over from cmd.php to Spine.
Of course, even Spine will need to start php! And that's exactly, where the
thingy called **Script Server Data Query** drops in. But let's leave this for
the next main chapter.
prosper from the performance boost when switching over from cmd.php to Spine. Of
course, even Spine will need to start php! And that's exactly, where the thingy
called **Script Server Data Query** drops in. But let's leave this for the next
main chapter.
The code runs on Cacti 0.8.7 versions.
@@ -53,7 +53,7 @@ include(dirname(__FILE__) . '/../lib/snmp.php');
# define all OIDs we need for further processing
$oids = array(
'index' => '.1.3.6.1.2.1.2.2.1.1',
'index' => '.1.3.6.1.2.1.2.2.1.1',
);
$xml_delimiter = '!';
@@ -93,29 +93,29 @@ $snmp_context = '';
# it has to respond with the list of interface indices
# -------------------------------------------------------------------------
if ($cmd == 'index') {
# retrieve all indices from target
$return_arr = reindex(cacti_snmp_walk($hostname, $snmp_community,
$oids['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));
# retrieve all indices from target
$return_arr = reindex(cacti_snmp_walk($hostname, $snmp_community,
$oids['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));
# and print each index as a separate line
for ($i=0;($i<sizeof($return_arr));$i++) {
print $return_arr[$i] . "\n";
}
# and print each index as a separate line
for ($i=0;($i<sizeof($return_arr));$i++) {
print $return_arr[$i] . "\n";
}
} else {
print "Invalid use of script query, required parameters:\n\n";
print " <hostname> <cmd>\n";
print "Invalid use of script query, required parameters:\n\n";
print " <hostname> <cmd>\n";
}
function reindex($arr) {
$return_arr = array();
$return_arr = array();
for ($i=0;($i<sizeof($arr));$i++) {
$return_arr[$i] = $arr[$i]['value'];
}
for ($i=0;($i<sizeof($arr));$i++) {
$return_arr[$i] = $arr[$i]['value'];
}
return $return_arr;
return $return_arr;
}
```
@@ -167,49 +167,49 @@ Array
)
```
The values of interest are stored in `$return_arr[$i] = $arr[$i][“value”];`.
The **function_reindex** gets them all.
The values of interest are stored in `$return_arr[$i] = $arr[$i][“value”];`. The
**function_reindex** gets them all.
## 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 and create a file named **ifTraffic.xml**. You may of course choose
your own name.
values only. So change to your `<path_cacti>/resources/script_queries` directory
and create a file named **ifTraffic.xml**. You may of course choose your own
name.
```xml
<interface>
<name>Get Interface Traffic Information</name>
<script_path>|path_php_binary| -q |path_cacti|/scripts/query_interface_traffic.php</script_path>
<arg_prepend>|host_hostname|</arg_prepend>
<arg_index>index</arg_index>
<name>Get Interface Traffic Information</name>
<script_path>|path_php_binary| -q |path_cacti|/scripts/query_interface_traffic.php</script_path>
<arg_prepend>|host_hostname|</arg_prepend>
<arg_index>index</arg_index>
<fields>
<ifIndex>
<name>Index</name>
<direction>input</direction>
<query_name>index</query_name>
</ifIndex>
</fields>
<fields>
<ifIndex>
<name>Index</name>
<direction>input</direction>
<query_name>index</query_name>
</ifIndex>
</fields>
</interface>
```
Lets talk about the header elements
Field | Description
--- | ---
name | Short Name; chose your own one if you want
script_path | Whole command to execute the script from cli. `|path_php_binary|` is a cacti builtin variable for `/the/full/path/to/php`. `|path_cacti|` in turn gives the path of the current cacti installation directory.
arg_prepend | All arguments passed to the script go here. There are some builtin variables, again. |host_hostname| represents the hostname of the device this query will be associated to.
arg_index | The string given here will be passed just after all `<arg_prepend>` to the script for indexing requests. Up to now, this is the only method our script will answer to.
fields | All fields will be defined in this section. Up to now, only the index field is defined
name | The name of this very field
query_name | Name of this field when performing a query or a get request (will be shown later, don't worry now).
| field | description |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | Short Name; chose your own one if you want |
| script_path | Whole command to execute the script from cli. `path_php_binary`is a cacti builtin variable for`/the/full/path/to/php`. `path_cacti` in turn gives the path of the current cacti installation directory. |
| arg_prepend | All arguments passed to the script go here. There are some builtin variables, again. `host_hostname` represents the hostname of the device this query will be associated to. |
| arg_index | The string given here will be passed just after all `<arg_prepend>` to the script for indexing requests. Up to now, this is the only method our script will answer to. |
| fields | All fields will be defined in this section. Up to now, only the index field is defined |
| name | The name of this very field |
| query_name | Name of this field when performing a query or a get request (will be shown later, don't worry now). |
direction | Description
--- | ---
input | defines all fields that serve as a descriptive information to a specific table index. These values will not be graphed but may be printed in e.g.graph titles by means of `|query_<name>|`
output | defines all fields that will yield a number that should be stored in some RRDfile
| direction | Description |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| input | defines all fields that serve as a descriptive information to a specific table index. These values will not be graphed but may be printed in e.g.graph titles by means of `query\_<name>` |
| output | defines all fields that will yield a number that should be stored in some RRDfile |
Now save this file and lets turn to cacti to implement this one. First, go to
**Data Queries** to see
@@ -226,14 +226,14 @@ and don't forget to choose **Get Script Data (indexed)**. **Create** to see
![Script Data Query - Add 03](images/dq-add-03.preview.png)
It has now **Successfully located XML file**. But this does not mean that there
are no errors. So lets go on with that. Turn to the **Device** you want to
query and add the new **Data Query** as shown:
are no errors. So lets go on with that. Turn to the **Device** you want to query
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. When done, see the results as
**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.
When done, see the results as
![Script Data Query - Associate 02](images/dev-dq-02.preview.png)
@@ -243,15 +243,15 @@ To see your script at work, select **Verbose Query** to see:
## Completing the Script
Now, lets improve our basic script. First, lets define all the variables
(OIDs), this script should ask for.
Now, lets improve our basic script. First, lets define all the variables (OIDs),
this script should ask for.
```php
<?php
/* do NOT run this script through a web browser */
if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
die("<br><strong>This script is only meant to run at the command line.</strong>");
die("<br><strong>This script is only meant to run at the command line.</strong>");
}
# deactivate http headers
@@ -262,17 +262,17 @@ include(dirname(__FILE__) . "/../lib/snmp.php");
# define all OIDs we need for further processing
$oids = array(
"index" => ".1.3.6.1.2.1.2.2.1.1",
"ifstatus" => ".1.3.6.1.2.1.2.2.1.8",
"ifdescription" => ".1.3.6.1.2.1.2.2.1.2",
"ifname" => ".1.3.6.1.2.1.31.1.1.1.1",
"ifalias" => ".1.3.6.1.2.1.31.1.1.1.18",
"iftype" => ".1.3.6.1.2.1.2.2.1.3",
"ifspeed" => ".1.3.6.1.2.1.2.2.1.5",
"ifHWaddress" => ".1.3.6.1.2.1.2.2.1.6",
"ifInOctets" => ".1.3.6.1.2.1.2.2.1.10",
"ifOutOctets" => ".1.3.6.1.2.1.2.2.1.16",
);
"index" => ".1.3.6.1.2.1.2.2.1.1",
"ifstatus" => ".1.3.6.1.2.1.2.2.1.8",
"ifdescription" => ".1.3.6.1.2.1.2.2.1.2",
"ifname" => ".1.3.6.1.2.1.31.1.1.1.1",
"ifalias" => ".1.3.6.1.2.1.31.1.1.1.18",
"iftype" => ".1.3.6.1.2.1.2.2.1.3",
"ifspeed" => ".1.3.6.1.2.1.2.2.1.5",
"ifHWaddress" => ".1.3.6.1.2.1.2.2.1.6",
"ifInOctets" => ".1.3.6.1.2.1.2.2.1.10",
"ifOutOctets" => ".1.3.6.1.2.1.2.2.1.16",
);
$xml_delimiter = "!";
```
@@ -318,16 +318,16 @@ The code responsible for the “index” option is left unchanged:
# it has to respond with the list of interface indices
# -------------------------------------------------------------------------
if ($cmd == "index") {
# retrieve all indices from target
$return_arr = reindex(cacti_snmp_walk($hostname, $snmp_community,
$oids["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));
# retrieve all indices from target
$return_arr = reindex(cacti_snmp_walk($hostname, $snmp_community,
$oids["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));
# and print each index as a separate line
for ($i=0;($i<sizeof($return_arr));$i++) {
print $return_arr[$i] . "\n";
}
# and print each index as a separate line
for ($i=0;($i<sizeof($return_arr));$i++) {
print $return_arr[$i] . "\n";
}
```
The new code implements the **query** function as follows
@@ -347,8 +347,8 @@ The new code implements the **query** function as follows
# it has to respond with the list of
# interface indices along with the description of the interface
# -------------------------------------------------------------------------
}elseif ($cmd == "query" && isset($query_field)) {
$arr_index = reindex(cacti_snmp_walk($hostname, $snmp_community,
} elseif ($cmd == "query" && isset($query_field)) {
$arr_index = reindex(cacti_snmp_walk($hostname, $snmp_community,
$oids["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));
@@ -357,9 +357,9 @@ The new code implements the **query** function as follows
$snmp_auth_password, $snmp_auth_protocol, $snmp_priv_passphrase, $snmp_priv_protocol,
$snmp_context, $snmp_port, $snmp_timeout, $snmp_retries, $max_oids, SNMP_POLLER));
for ($i=0;($i<sizeof($arr_index));$i++) {
print $arr_index[$i] . $xml_delimiter . $arr[$i] . "\n";
}
for ($i=0;($i<sizeof($arr_index));$i++) {
print $arr_index[$i] . $xml_delimiter . $arr[$i] . "\n";
}
```
Last option is the **get** function
@@ -381,8 +381,8 @@ 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)) {
print (cacti_snmp_get($hostname, $snmp_community,
} 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));
@@ -394,20 +394,20 @@ The rest of it is left unchanged. For sake of completeness, I repeat it here
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
} else {
print "Invalid use of script query, required parameters:\n\n";
print " <hostname> <community> <version> <snmp_port> <timeout>
<max_oids> <auth_user> <auth_passphrase> <auth_proto>
<priv_passphrase> <priv_proto> <context> <cmd>\n";
print "Invalid use of script query, required parameters:\n\n";
print " <hostname> <community> <version> <snmp_port> <timeout>
<max_oids> <auth_user> <auth_passphrase> <auth_proto>
<priv_passphrase> <priv_proto> <context> <cmd>\n";
}
function reindex($arr) {
$return_arr = array();
$return_arr = array();
for ($i=0;($i<sizeof($arr));$i++) {
$return_arr[$i] = $arr[$i]["value"];
}
for ($i=0;($i<sizeof($arr));$i++) {
$return_arr[$i] = $arr[$i]["value"];
}
return $return_arr;
return $return_arr;
}
?>
@@ -432,107 +432,107 @@ it at `<path_cacti>/resources/script_queries/ifTraffic.xml`.
```xml
<interface>
<name>Get Interface Traffic Information</name>
<script_path>|path_php_binary| -q |path_cacti|/scripts/query_interface_traffic.php</script_path>
<arg_prepend>|host_hostname| |host_snmp_community| |host_snmp_version| |host_snmp_port| |host_snmp_timeout| |host_max_oids| "|host_snmp_username|" "|host_snmp_password|" "|host_snmp_auth_protocol|" "|host_snmp_priv_passphrase|" "|host_snmp_priv_protocol|" "|host_snmp_context|"</arg_prepend>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<arg_get>get</arg_get>
<output_delimeter>!</output_delimeter>
<index_order>ifIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<name>Get Interface Traffic Information</name>
<script_path>|path_php_binary| -q |path_cacti|/scripts/query_interface_traffic.php</script_path>
<arg_prepend>|host_hostname| |host_snmp_community| |host_snmp_version| |host_snmp_port| |host_snmp_timeout| |host_max_oids| "|host_snmp_username|" "|host_snmp_password|" "|host_snmp_auth_protocol|" "|host_snmp_priv_passphrase|" "|host_snmp_priv_protocol|" "|host_snmp_context|"</arg_prepend>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<arg_get>get</arg_get>
<output_delimeter>!</output_delimeter>
<index_order>ifIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
```
Let's discuss the changes
Field | Description
--- | ---
arg_prepend | some more parameters were added to provide all necessary values for the script. They are position-dependent. You may notice the strange tics I've added to e.g. host_snmp_username and host_snmp_password. If you're not using those SNMP V3 parameters, they must be quoted, else the script would fail because two parameters would be missing.
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_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.
| Field | Description |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| arg_prepend | some more parameters were added to provide all necessary values for the script. They are position-dependent. You may notice the strange tics I've added to e.g. host_snmp_username and host_snmp_password. If you're not using those SNMP V3 parameters, they must be quoted, else the script would fail because two parameters would be missing. |
| 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_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. |
Type | Description
--- | ---
numeric | The indexes in this script query are to be sorted numerically (ie. 1,2,3,10,20,31)
alphabetic | The indexes in this script query are to be sorted alphabetically (1,10,2,20,3,31)
| Type | Description |
| ---------- | ---------------------------------------------------------------------------------- |
| numeric | The indexes in this script query are to be sorted numerically (ie. 1,2,3,10,20,31) |
| alphabetic | The indexes in this script query are to be sorted alphabetically (1,10,2,20,3,31) |
Now lets turn to the fields section:
```xml
<fields>
<ifIndex>
<name>Index</name>
<direction>input</direction>
<query_name>index</query_name>
</ifIndex>
....
<fields>
<ifIndex>
<name>Index</name>
<direction>input</direction>
<query_name>index</query_name>
</ifIndex>
<ifstatus>
<name>Status</name>
<direction>input</direction>
<query_name>ifstatus</query_name>
</ifstatus>
<ifstatus>
<name>Status</name>
<direction>input</direction>
<query_name>ifstatus</query_name>
</ifstatus>
<ifdescription>
<name>Description</name>
<direction>input</direction>
<query_name>ifdescription</query_name>
</ifdescription>
<ifdescription>
<name>Description</name>
<direction>input</direction>
<query_name>ifdescription</query_name>
</ifdescription>
<ifname>
<name>Name</name>
<direction>input</direction>
<query_name>ifname</query_name>
</ifname>
<ifname>
<name>Name</name>
<direction>input</direction>
<query_name>ifname</query_name>
</ifname>
<ifalias>
<name>Alias</name>
<direction>input</direction>
<query_name>ifalias</query_name>
</ifalias>
<ifalias>
<name>Alias</name>
<direction>input</direction>
<query_name>ifalias</query_name>
</ifalias>
<iftype>
<name>Type</name>
<direction>input</direction>
<query_name>iftype</query_name>
</iftype>
<iftype>
<name>Type</name>
<direction>input</direction>
<query_name>iftype</query_name>
</iftype>
<ifspeed>
<name>Speed</name>
<direction>input</direction>
<query_name>ifspeed</query_name>
</ifspeed>
<ifspeed>
<name>Speed</name>
<direction>input</direction>
<query_name>ifspeed</query_name>
</ifspeed>
<ifHWaddress>
<name>HWaddress</name>
<direction>input</direction>
<query_name>ifHWaddress</query_name>
</ifHWaddress>
<ifHWaddress>
<name>HWaddress</name>
<direction>input</direction>
<query_name>ifHWaddress</query_name>
</ifHWaddress>
<ifInOctets>
<name>InOctets</name>
<direction>output</direction>
<query_name>ifInOctets</query_name>
</ifInOctets>
<ifInOctets>
<name>InOctets</name>
<direction>output</direction>
<query_name>ifInOctets</query_name>
</ifInOctets>
<ifOutOctets>
<name>OutOctets</name>
<direction>output</direction>
<query_name>ifOutOctets</query_name>
</ifOutOctets>
</fields>
<ifOutOctets>
<name>OutOctets</name>
<direction>output</direction>
<query_name>ifOutOctets</query_name>
</ifOutOctets>
</fields>
</interface>
```
These fields are related to the **OID** array of the script. **Attention**: The
**query_name** strings must match the OID names **exactly!** Please notice,
that all but the last two fields use **direction input**. All variables
representing numeric values to be graphed must be defined as **direction
output** instead.
**query_name** strings must match the OID names **exactly!** Please notice, that
all but the last two fields use **direction input**. All variables representing
numeric values to be graphed must be defined as **direction output** instead.
Now, lets test the “query” option. The keyword “query” must be given along with
the variable, that should be queried. The script now will scan all indices and
@@ -620,8 +620,8 @@ is as follows
Of course, snmp_username and snmp_user_password and more may differ from your
installation defaults. Read it carefully, and you'll notice, that all XML
**fields** were scanned and the output shown. All? No, not all. The **direction
output** fields are missing! But this is on purpose as those won't make sense
as header fields but will be written to RRDfiles.
output** fields are missing! But this is on purpose as those won't make sense as
header fields but will be written to RRDfiles.
## Create the Data Template
@@ -635,23 +635,22 @@ 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,
select **Data Input Method** to read **Get Script Data (Indexed)**,
and **Data Source Profile**.
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.
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.
Now, before you press the `Create` button als oplease proceed to the
lower half of the form and complete the first RRDfile Data Source.
Enter the **Internal Data Source Name**. You may select this name freely,
though note your are limited to only 19 characters and spaces are not
allowed. There's no need to match it to any of the XML field names.
As the OID is a **COUNTER**, the **Data Source Type** must be selected
appropriately. `Create`.
Now, before you press the `Create` button als oplease proceed to the lower half
of the form and complete the first RRDfile Data Source. Enter the **Internal
Data Source Name**. You may select this name freely, though note your are
limited to only 19 characters and spaces are not allowed. There's no need to
match it to any of the XML field names. As the OID is a **COUNTER**, the **Data
Source Type** must be selected appropriately. `Create`.
![Script Data Query - Data Template 04](images/dev-dt-04.preview.png)
@@ -659,10 +658,10 @@ 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 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.
Again, fill in the Data Source Name. Pay attention to set the maximum value to 0
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.
## Create the Graph Template
@@ -683,8 +682,8 @@ enter some text
![Script Data Query - Graph Template 05](images/dev-gt-05.preview.png)
Save and add the next graph item. Now, we're going to use the “LEGEND”
time saver again:
Save and add the next graph item. Now, we're going to use the “LEGEND” time
saver again:
![Script Data Query - Graph Template 06](images/dev-gt-06.preview.png)
@@ -697,8 +696,8 @@ and remove the newline by deselecting the checkbox
![Script Data Query - Graph Template 08](images/dev-gt-08.png)
Now lets add the same data source again, but as a LINE1, MAXimum with a
slightly changed color. Newline is checked this time
Now lets add the same data source again, but as a LINE1, MAXimum with a slightly
changed color. Newline is checked this time
![Script Data Query - Graph Template 09](images/dev-gt-09.preview.png)
@@ -726,18 +725,18 @@ newline
![Script Data Query - Graph Template 14](images/dev-gt-14.preview.png)
Hoping, you've got all those steps correctly, finally **Save** your work. Take
a cup of coffee to get your brains free again, kiss your wife, hug your
children and/or pet your dog; sequence is arbitrary.
Hoping, you've got all those steps correctly, finally **Save** your work. Take a
cup of coffee to get your brains free again, kiss your wife, hug your children
and/or pet your dog; sequence is arbitrary.
## Associate Graph Template with Data Query
Huh, that sound complicated. Why would it be necessary to do so? Let me
explain: You remember the **Data Template**, do you? The names of the data
source item was chosen arbitrary. The Graph Items were associated with those
data source items, but those in turn were not related to anything in the XML
file. Not related? Not yet! So, let's revisit the **Data Query**. Remember the
lower part on **Associated Graph Templates**. Click **Add**
Huh, that sound complicated. Why would it be necessary to do so? Let me explain:
You remember the **Data Template**, do you? The names of the data source item
was chosen arbitrary. The Graph Items were associated with those data source
items, but those in turn were not related to anything in the XML file. Not
related? Not yet! So, let's revisit the **Data Query**. Remember the lower part
on **Associated Graph Templates**. Click **Add**
![Script Data Query - Graph Template 15](images/dev-dq-20.preview.png)
@@ -761,9 +760,9 @@ denoted **Suggested Values**
![Script Data Query - Suggested Value 01](images/dev-dq-23.png)
The example shows `|host_description| - Traffic - |query_ifdescription|`
entered both for **name** of the Data Template and **title** of the Graph
Template. Click **Add**, one by one
The example shows `|host_description| - Traffic - |query_ifdescription|` entered
both for **name** of the Data Template and **title** of the Graph Template.
Click **Add**, one by one
![Script Data Query - Suggested Value 02](images/dev-dq-24.preview.png)
@@ -780,10 +779,10 @@ Click **Save**, and find the new Graph Template added to the list of
![Script Data Query - Suggested Value 03](images/dev-dq-25.preview.png)
You may continue to add more **Graph Templates**, each of them may be related
to other output field of the XML file. Find, as an example, lots of graph
templates associated to the standard `Interface Statistics` Data Query to get
an idea what I'm talking about.
You may continue to add more **Graph Templates**, each of them may be related to
other output field of the XML file. Find, as an example, lots of graph templates
associated to the standard `Interface Statistics` Data Query to get an idea what
I'm talking about.
![Script Data Query - Edit](images/dev-dq-26.preview.png)
@@ -801,9 +800,9 @@ to see
![Script Data Query - Devices 02](images/dev-dev-11-0.preview.png)
I've left the standard Interface Statistics in the screenshot. So you may
compare both Queries. Our PHP Interface Traffic stuff has two more header
items, Name and Alias. But all data seen equals the standard SNMP Data Query;
not that bad, eh?
compare both Queries. Our PHP Interface Traffic stuff has two more header items,
Name and Alias. But all data seen equals the standard SNMP Data Query; not that
bad, eh?
Now, select one item
@@ -823,19 +822,22 @@ this example, don't worry about that.
Having a closer view, you may notice a difference in magnitude (y-axis). But
please compare the units used. The first graph uses **Bytes**, the latter one
uses **Bits**. For comparison, it would be necessary to multiply the first one
with 8. This may be done using a CDEF Turn Bytes into Bits, applied to all
items of the **Graph Template**. This task is left to you.
with 8. This may be done using a CDEF Turn Bytes into Bits, applied to all items
of the **Graph Template**. This task is left to you.
Please find the example resource, script, and Data Query below. Save
`ifTraffic.xml` into `./resource/script_queries`, and `query_interface_traffic.php`
into the `./scripts` directory and import the Data Query
`cacti_data_query_php_interface_traffic.xml`.
Please find the example resource, script, and Data Query below. Save
`ifTraffic.xml` into `./resource/script_queries`, and
`query_interface_traffic.php` into the `./scripts` directory and import the Data
Query `cacti_data_query_php_interface_traffic.xml`.
[Cacti Data Query for PHP Interface Traffic](resource/xml/cacti_data_query_php_interface_traffic.xml)
[ifTraffic.xml](resource/xml/ifTraffic.xml) download and store into `resource/script_queries`.
[ifTraffic.xml](resource/xml/ifTraffic.xml) download and store into
`resource/script_queries`.
[query_interface_traffic.php](resource/xml/query_interface_traffic.php) download and store into `scripts`.
[query_interface_traffic.php](resource/xml/query_interface_traffic.php) download
and store into `scripts`.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -98,4 +98,4 @@ $rdatabase_ssl_ca = '';
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -148,4 +148,4 @@ as **Data Queries**, **Data Input Methods**, and **Script Server** add a few
steps to the Template creation process.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+25 -28
View File
@@ -53,20 +53,18 @@ host.
### Availability/Reachability Options
- **Downed Device Detection**
- ___NONE___ - Deactivate downed host detection
- ___PING and SNMP Uptime___ - Ping and then also check SNMP Uptime
- ___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
- ___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
- _**NONE**_ - Deactivate downed host detection
- _**PING and SNMP Uptime**_ - Ping and then also check SNMP Uptime
- _**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
- _**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
- **Ping Port** - Available only for UDP/TCP PING test types. Please define the
port to be tested here. Make sure, that no firewall
@@ -81,11 +79,10 @@ host.
### SNMP Options
- **SNMP Version**
- ___Version 1___ - Use SNMP Version 1. Be aware, that 64bit counters are not
- _**Version 1**_ - Use SNMP Version 1. Be aware, that 64bit counters are not
supported in this SNMP version.
- ___Version 2___ - Referred to as SNMP V2c in most SNMP documentations
- ___Version 3___ - SNMP V3, supporting authentication and encryption
- _**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
@@ -96,33 +93,33 @@ host.
- **Maximum OID's 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
_**WARNING**_: This feature only works when using Spine.
_**WARNING**_ Some devices do not support values greater than `1` and/or may
reports as unknown data if this value is too high.
### Security Options for SNMP V3
- ***SNMP Username*** - `username` of an SNMP V3 `createUser` statement or
- _**SNMP Username**_ - `username` of an SNMP V3 `createUser` statement or
equivalent
- ***SNMP Password*** - `authpassphrase` of an SNMP V3 `createUser` statement
- _**SNMP Password**_ - `authpassphrase` of an SNMP V3 `createUser` statement
or equivalent
- ***SNMP Auth Protocol*** - Authentication type of an SNMP V3 `createUser`
- _**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 Privacy Passphrase*** - The `privacy passphrase` of an SNMP V3
- _**SNMP Privacy Passphrase**_ - The `privacy passphrase` of an SNMP V3
`createUser` statement or equivalent.
- ***SNMP Privacy Protocol*** - The `privacy protocol` of an SNMP V3
- _**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.
**NOTE** Spine may not support DES today as some Net-SNMP distributions
**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),
- _**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
@@ -167,7 +164,7 @@ SNMP retrieval methods in Cacti and are outlined below.
### SNMP V3 Options Explained
SNMP supports authentication and encryption features when using SNMP protocol
version 3 known as *View-Based Access Control Model (VACM)*. This requires,
version 3 known as **View-Based Access Control Model (VACM)**. This requires,
that the target device in question supports and is configured for SNMP V3 use.
In general, configuration of V3 options is target type dependent. The following
is cited from `man snmpd.conf` concerning user definitions
@@ -332,4 +329,4 @@ use the Graph Management item on the menu. Likewise, the Data Source menu item
allows you to manage your data sources in Cacti.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -28,4 +28,4 @@ remove any **Graph Items** from any **Graph** that do not appear in the **Graph
to be imported. Use this option with care.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+33 -20
View File
@@ -19,14 +19,22 @@
dnf module enable php:8.0
```
### A special note for systems using PHP-FPM
2. Install Apache
Prior to starting the setup process of Cacti you should restart the PHP-FPM
Daemon to rebuild the Cache or you may recive a HTTP 500 Error
```console
systemctl restart php-fpm
```
2.Install Apache
```console
yum install -y httpd
```
3. Enable and start the service to ensure it starts when the system reboots
3.Enable and start the service to ensure it starts when the system reboots
```console
systemctl start httpd
@@ -228,7 +236,8 @@ during the installation.
and `your_cacti_password` with your own details.
```sql
MariaDB [(none)]> CREATE USER 'your_cacti_username'@'localhost' IDENTIFIED BY 'your_cacti_password';
MariaDB [(none)]> CREATE USER 'your_cacti_username'@'localhost'
IDENTIFIED BY 'your_cacti_password';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cacti.* TO 'your_cacti_username'@'localhost';
Query OK, 0 rows affected (0.00 sec)
@@ -364,13 +373,15 @@ configure the basics for Cacti.
1. Install the necessary packages to compile and install spine
For RHEL/CENTOS/ROCKY 8+, you must enable the powertools repo first before downloading the below packages
For RHEL/CENTOS/ROCKY 8+, you must enable the powertools repo first before
downloading the below packages
```console
yum config-manager --set-enabled powertools
```
For RHEL/CENTOS/ROCKY 7.x and below
```console
yum install -y autoconf automake libtool dos2unix help2man \
openssl-devel mariadb-devel net-snmp-devel
@@ -454,9 +465,11 @@ documentation on how to make your SELinux policy right.
### Considerations when using Proxies in front of Cacti (Cacti 1.2.23+)
For optimal security, only specify the HTTP headers that are set by your proxy software to prevent unauthorized access. These can be set by editing the following section of config.php
For optimal security, only specify the HTTP headers that are set by your proxy
software to prevent unauthorized access.
These can be set by editing the following section of config.php
```
```ini
* Allow the use of Proxy IPs when searching for client
* IP to be used
*
@@ -464,21 +477,21 @@ For optimal security, only specify the HTTP headers that are set by your proxy s
* - false: to use only REMOTE_ADDR
* - true: to use all allowed headers (not advised)
* - array of one or more the following:
* 'X-Forwarded-For',
* 'X-Client-IP',
* 'X-Real-IP',
* 'X-ProxyUser-Ip',
* 'CF-Connecting-IP',
* 'True-Client-IP',
* 'HTTP_X_FORWARDED',
* 'HTTP_X_FORWARDED_FOR',
* 'HTTP_X_CLUSTER_CLIENT_IP',
* 'HTTP_FORWARDED_FOR',
* 'HTTP_FORWARDED',
* 'HTTP_CLIENT_IP',
*'X-Forwarded-For',
*'X-Client-IP',
*'X-Real-IP',
*'X-ProxyUser-Ip',
*'CF-Connecting-IP',
*'True-Client-IP',
*'HTTP_X_FORWARDED',
*'HTTP_X_FORWARDED_FOR',
*'HTTP_X_CLUSTER_CLIENT_IP',
*'HTTP_FORWARDED_FOR',
*'HTTP_FORWARDED',
*'HTTP_CLIENT_IP',
*
* NOTE: The following will always be checked:
* 'REMOTE_ADDR',
*'REMOTE_ADDR',
*/
$proxy_headers = null;
```
@@ -487,4 +500,4 @@ $proxy_headers = null;
all SELinux context and permissions.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+152 -153
View File
@@ -6,20 +6,20 @@
1. Install Nginx
```console
yum install -y nginx
```
```console
yum install -y nginx
```
2. Enable and start the service to ensure it starts when the system reboots
```console
systemctl start nginx
systemctl enable nginx
```
```console
systemctl start nginx
systemctl enable nginx
```
### Example configuration file for Nginx and SSL
This example assumes you have your own certificates already. You should make
This example assumes you have your own certificates already. You should make
sure you change the paths to match your setup.
Replace `YourOwnCertFile.crt` and `YourOwnCertFile.key` with the names of the
@@ -143,30 +143,29 @@ server {
### Database Server
The choice between MySQL server and MariaDB is normally down to the OS
maintainers if you use one of the predefined LAMP setup installations. If you
are deciding between these yourself, you should research this via your
favorite search engine.
maintainers if you use one of the predefined LAMP setup installations. If you
are deciding between these yourself, you should research this via your favorite
search engine.
Whilst MySQL is the original open source SQL database server created in 1995
which is now owned by Oracle, MariaDB is designed as a drop-in replacement by
some of the original MySQL developers / owners. This will likely continue to
be a drop-in alternative until there is a major divergence that can not be
bridged.
some of the original MySQL developers / owners. This will likely continue to be
a drop-in alternative until there is a major divergence that can not be bridged.
#### MySQL
1. Install MySQL server
```console
yum install -y mysql mysql-server
```
```console
yum install -y mysql mysql-server
```
2. Enable and start the service to ensure it starts when the system reboots
```console
systemctl enable mysqld
systemctl start mysqld
```
```console
systemctl enable mysqld
systemctl start mysqld
```
#### MariaDB
@@ -178,10 +177,10 @@ bridged.
2. Enable and start the service to ensure it starts when the system reboots
```console
systemctl enable mariadb
systemctl start mariadb
```
```console
systemctl enable mariadb
systemctl start mariadb
```
### MySQL/MariaDB common tasks and recommendations
@@ -197,54 +196,54 @@ during the installation.
1. Edit your **server.cnf** file
```console
vim /etc/my.cnf.d/server.cnf
```
```console
vim /etc/my.cnf.d/server.cnf
```
The following `[mysqld]` section is a base configuration. The installer
will provide recommendations based on the actual system which will be more
tailored to your environment.
The following `[mysqld]` section is a base configuration. The installer will
provide recommendations based on the actual system which will be more
tailored to your environment.
```shell
[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
max_allowed_packet=18M
max_heap_table_size=98M
tmp_table_size=64M
join_buffer_size=64M
innodb_buffer_pool_size=488M
innodb_doublewrite=OFF
innodb_flush_log_at_timeout=3
innodb_read_io_threads=32
innodb_write_io_threads=16
log-error = /var/log/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/log/mysql/mysql-slow.log
```
```shell
[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
max_allowed_packet=18M
max_heap_table_size=98M
tmp_table_size=64M
join_buffer_size=64M
innodb_buffer_pool_size=488M
innodb_doublewrite=OFF
innodb_flush_log_at_timeout=3
innodb_read_io_threads=32
innodb_write_io_threads=16
log-error = /var/log/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/log/mysql/mysql-slow.log
```
2. Restart MySQL/MariaDB service to pick up the changes
```console
systemctl restart mysql
```
```console
systemctl restart mysql
```
3. Populate timezone table with available timezones
```console
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
```
```console
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
```
#### Setup Cacti database
1. Login to MySQL/MariaDB as root to create Cacti database
```console
# mysql -u root -p
MariaDB [(none)]> create database if not exists cacti;
Query OK, 1 row affected (0.00 sec)
```
```console
# mysql -u root -p
MariaDB [(none)]> create database if not exists cacti;
Query OK, 1 row affected (0.00 sec)
```
2. Import Cacti database from SQL file
@@ -255,23 +254,22 @@ tailored to your environment.
```
3. Grant Cacti username access to Cacti database. Replace `your_cacti_username`
and `your_cacti_password` with your own details.
and `your_cacti_password` with your own details.
```sql
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cacti.* TO 'your_cacti_username'@'localhost' IDENTIFIED BY
'your_cacti_password';
Query OK, 0 rows affected (0.00 sec)
```
```sql
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cacti.* TO 'your_cacti_username'@'localhost' IDENTIFIED BY 'your_cacti_password';
Query OK, 0 rows affected (0.00 sec)
```
4. Grant cacti username to MySQL timezone table
```sql
MariaDB [(none)]> GRANT SELECT ON mysql.time_zone_name TO 'cacti'@'localhost';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
```
```sql
MariaDB [(none)]> GRANT SELECT ON mysql.time_zone_name TO 'cacti'@'localhost';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
```
5. Save the Database Charset and Collation
```sql
@@ -287,67 +285,68 @@ PHP and various packages are all required by Cacti for successful operation
1. Install PHP and required packages.
```console
yum install -y php php-common php-bcmath php-cli \
php-mysqlnd php-gd php-gmp php-intl \
php-json php-ldap php-mbstring \
php-pdo php-pear php-snmp php-process \
php-xml php-zip php-fpm
```
```console
yum install -y php php-common php-bcmath php-cli \
php-mysqlnd php-gd php-gmp php-intl \
php-json php-ldap php-mbstring \
php-pdo php-pear php-snmp php-process \
php-xml php-zip php-fpm
```
---
Note: **php-fpm** is only required if your Web Server is Nginx
2. Set a timezone to your PHP.INI configuration
1. Set a timezone to your PHP.INI configuration
Edit php.ini, typically located at `/etc/php.ini`
Edit php.ini, typically located at `/etc/php.ini`
```console
date.timezone = Pacific/Auckland
```
```console
date.timezone = Pacific/Auckland
```
3. Disable insecure `cgi.fix_pathinfo`
2. Disable insecure `cgi.fix_pathinfo`
```console
cgi.fix_pathinfo=0
```
```console
cgi.fix_pathinfo=0
```
#### Setup php-fpm
1. Enable and start the service to ensure it starts when the system reboots
```console
systemctl start php-fpm
systemctl enable php-fpm
```
```console
systemctl start php-fpm
systemctl enable php-fpm
```
2. Edit `/etc/php-fpm.d/www.conf`
Find `listen = 127.0.0.1:9000` and add the following line below
Find `listen = 127.0.0.1:9000` and add the following line below
```console
listen = /var/run/php-fpm/php-fpm.sock
```
```console
listen = /var/run/php-fpm/php-fpm.sock
```
Find `listen.owner` and `listen.group` and set them to nginx
Find `listen.owner` and `listen.group` and set them to nginx
```console
listen.owner = nginx
listen.group = nginx
```
```console
listen.owner = nginx
listen.group = nginx
```
Find user and group and set them to `nginx`
Find user and group and set them to `nginx`
```console
user = nginx
group = nginx
```
```console
user = nginx
group = nginx
```
Restart php-fpm to pick up the changes
Restart php-fpm to pick up the changes
```console
systemctl restart php-fpm
```
```console
systemctl restart php-fpm
```
### RRDtool
@@ -374,8 +373,8 @@ systemctl start snmpd
The following steps will show you how to manually download, install and
configure the basics for Cacti.
1. Download Cacti source code from [Cacti Web
Site](https://www.cacti.net/download_cacti.php)
1. Download Cacti source code from
[Cacti Web Site](https://www.cacti.net/download_cacti.php)
```console
cd /tmp
@@ -386,51 +385,50 @@ configure the basics for Cacti.
2. Edit the config.php file
```console
mv -v /usr/share/nginx/html/cacti/include/config.php-dist /usr/share/nginx/html/cacti/include/config.php
```
```console
mv -v /usr/share/nginx/html/cacti/include/config.php-dist /usr/share/nginx/html/cacti/include/config.php
```
3. Update database_ fields with your own details. This section only applies to
the Main Cacti Server
3. Update database\_ fields with your own details. This section only applies to
the Main Cacti Server
```php
$database_type = 'mysql';
$database_default = 'your_cacti_database';
$database_hostname = 'localhost';
$database_username = 'your_cacti_username';
$database_password = 'your_cacti_password';
$database_port = '3306';
$database_ssl = false;
$database_ssl_key = '';
$database_ssl_cert = '';
$database_ssl_ca = '';
```
```php
$database_type = 'mysql';
$database_default = 'your_cacti_database';
$database_hostname = 'localhost';
$database_username = 'your_cacti_username';
$database_password = 'your_cacti_password';
$database_port = '3306';
$database_ssl = false;
$database_ssl_key = '';
$database_ssl_cert = '';
$database_ssl_ca = '';
```
4. Set your cookie domain to match your web site domain name
```console
$cacti_cookie_domain = 'cacti.yourdomain.com';
```
```console
$cacti_cookie_domain = 'cacti.yourdomain.com';
```
5. Create your cron task file or systemd units file
Starting with Cacti 1.2.16, you have the option to use either the
legacy Crontab entry, or an optional cactid units file and server
to run your Cacti pollers.
Starting with Cacti 1.2.16, you have the option to use either the legacy
Crontab entry, or an optional cactid units file and server to run your Cacti
pollers.
For Crontab use, follow the instructions below:
Create and edit `/etc/cron.d/cacti` file.
Make sure to setup the correct path to poller.php
Create and edit `/etc/cron.d/cacti` file. Make sure to setup the correct path
to poller.php
```console
*/5 * * * * nginx php /var/www/html/cacti/poller.php &>/dev/null
```
For systemd unit's file install, you will need to modify the
included units file to following your install location
and desired user and group's to run the Cacti poller as.
To complete the task, follow the procedure below:
For systemd unit's file install, you will need to modify the included units
file to following your install location and desired user and group's to run
the Cacti poller as. To complete the task, follow the procedure below:
```console
vim /var/www/html/cacti/service/cactid.service (edit the path)
@@ -441,8 +439,8 @@ configure the basics for Cacti.
systemctl status cactid
```
The systemd units file makes managing a highly available Cacti
setup a bit more convenient.
The systemd units file makes managing a highly available Cacti setup a bit
more convenient.
#### Spine
@@ -453,8 +451,8 @@ configure the basics for Cacti.
openssl-devel mariadb-devel net-snmp-devel
```
2. Download spine source code from [Cacti Web
Site](https://www.cacti.net/spine_download.php)
2. Download spine source code from
[Cacti Web Site](https://www.cacti.net/spine_download.php)
Go to /tmp to download the source code and extract it
@@ -473,10 +471,10 @@ configure the basics for Cacti.
config/install-sh -c -d '/usr/local/spine/bin'
/bin/sh ./libtool --mode=install /usr/bin/install -c spine '/usr/local/spine/bin'
libtool: install: /usr/bin/install -c spine /usr/local/spine/bin/spine
config/install-sh -c -d '/usr/local/spine/etc'
config/install-sh -c -d '/usr/local/spine/etc'
/usr/bin/install -c -m 644 spine.conf.dist '/usr/local/spine/etc'
config/install-sh -c -d '/usr/local/spine/share/man/man1'
/usr/bin/install -c -m 644 spine.1 '/usr/local/spine/share/man/man1'
/usr/bin/install -c -m 644 spine.1 '/usr/local/spine/share/man/man1'
```
4. Edit spine.conf
@@ -508,8 +506,8 @@ If you are having issues to access the web page, disable SELinux temporarily to
prove that the issues come from the SELinux policy. It is NOT recommended to
disable SELinux permanently.
[CentOS](https:////wiki.centos.org/es/HowTos/SELinux) has a lot of
documentation on how to make your SELinux policy right.
[CentOS](https:////wiki.centos.org/es/HowTos/SELinux) has a lot of documentation
on how to make your SELinux policy right.
Check SELinux status
@@ -529,8 +527,9 @@ Enable SELinux back
setenforce 1
```
**Note:** If you installed Cacti out of `/usr/share/nginx/html` make sure you fix
up all SELinux context and permissions.
**Note:** If you installed Cacti out of `/usr/share/nginx/html` make sure you
fix up all SELinux context and permissions.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+31 -17
View File
@@ -4,7 +4,18 @@
```console
apt-get update
apt-get install -y apache2 rrdtool mariadb-server snmp snmpd php7.0 php-mysql php7.0-snmp php7.0-xml php7.0-mbstring php7.0-json php7.0-gd php7.0-gmp php7.0-zip php7.0-ldap php7.0-mc
apt-get install -y apache2 rrdtool mariadb-server snmp snmpd php7.0 php-mysql
php7.0-snmp php7.0-xml php7.0-mbstring php7.0-json php7.0-gd php7.0-gmp php7.0-zip
php7.0-ldap php7.0-mc
```
### A special note for systems using PHP-FPM
Prior to starting the setup process of Cacti you should restart the PHP-FPM
Daemon to rebuild the Cache or you may recived a HTTP 500 Error
```console
systemctl restart php-fpm
```
### Downloading the Cacti software
@@ -111,9 +122,11 @@ wizard.
### Considerations when using Proxys in front of Cacti (Cacti 1.2.23+)
For optimal security, only specify the HTTP headers that are set by your proxy software to prevent unauthorized access. These can be set by editing the following section of config.php
For optimal security, only specify the HTTP headers that are set by your proxy
software to prevent unauthorized access.
These can be set by editing the following section of config.php
```
```ini
* Allow the use of Proxy IPs when searching for client
* IP to be used
*
@@ -121,23 +134,24 @@ For optimal security, only specify the HTTP headers that are set by your proxy s
* - false: to use only REMOTE_ADDR
* - true: to use all allowed headers (not advised)
* - array of one or more the following:
* 'X-Forwarded-For',
* 'X-Client-IP',
* 'X-Real-IP',
* 'X-ProxyUser-Ip',
* 'CF-Connecting-IP',
* 'True-Client-IP',
* 'HTTP_X_FORWARDED',
* 'HTTP_X_FORWARDED_FOR',
* 'HTTP_X_CLUSTER_CLIENT_IP',
* 'HTTP_FORWARDED_FOR',
* 'HTTP_FORWARDED',
* 'HTTP_CLIENT_IP',
*'X-Forwarded-For',
*'X-Client-IP',
*'X-Real-IP',
*'X-ProxyUser-Ip',
*'CF-Connecting-IP',
*'True-Client-IP',
*'HTTP_X_FORWARDED',
*'HTTP_X_FORWARDED_FOR',
*'HTTP_X_CLUSTER_CLIENT_IP',
*'HTTP_FORWARDED_FOR',
*'HTTP_FORWARDED',
*'HTTP_CLIENT_IP',
*
* NOTE: The following will always be checked:
* 'REMOTE_ADDR',
*'REMOTE_ADDR',
*/
$proxy_headers = null;
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -394,4 +394,4 @@ The following changes will be required regardless of your selected Webserver.
The start in box should say `c:\mycacti\website\cacti`.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -22,4 +22,4 @@ and other popular search engines regularly scan the Cacti Forums, so using
those services will help.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -176,4 +176,4 @@ Cacti documentation. For now, it's important just to know that these pages
exist.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -219,4 +219,4 @@ Script Server** command line to exit the script server.
> server before your retest your code.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -186,4 +186,4 @@ function plugin_PLUGINNAME_install () {
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+4 -4
View File
@@ -19,7 +19,7 @@ There are a number of popular plugins including:
Cacti Devices that are experiencing faults.
- **Intropage** - A plugin that provides a replacement to the Cacti console
showing key performance metrics across all of Cacti from a single page.
- **Weathermap** - A plugin that allows you to create architectural
- **Weathermap** - A plugin that allows you to create architectural
diagrams of your network and to animate them with status data.
In theory, these plugins can be integrated into Cacti very simply, and removed
@@ -28,8 +28,8 @@ plugins documentation before you start to use it.
## Legacy Plugins Notice
Plugins written for Cacti 0.8.x require modifications in order to be compatible
with Cacti 1.x. There are several changes that all plugin developers need to
Plugins written for Cacti 0.8.x require modifications in order to be compatible
with Cacti 1.x. There are several changes that all plugin developers need to
be aware of. Any of the Cacti Group maintained plugin can be
used as reference plugins for driving your plugin migration to the 1.x
framework and are available on [Github](https://github.com/Cacti/).
@@ -147,4 +147,4 @@ controlled at not only a global level, but now per plugin, per device and even
per file.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -23,4 +23,4 @@ An example plugin is provided here [Example Plugin](resources/example.tgz).
GitHub is the best place to publish your plugins. Learn to use it.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+641 -630
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -141,4 +141,4 @@ Cacti page loads fast. Including too much in the setup.php slows Cacti and
should be avoided.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+55 -56
View File
@@ -1,91 +1,89 @@
# Plugin Management
### Installing Plugins
## Installing Plugins
![plugins](images/plugins.png)
Installing plugins on cacti is a simple procedure
1) Download the plugin to cactidir/cacti/plugins
1. Download the plugin to cactidir/cacti/plugins
```console
git clone https://github.com/Cacti/plugin_thold.git
```
```console
git clone https://github.com/Cacti/plugin_thold.git
```
```console
mv plugin_thold /var/www/html/cacti/plugins
```
```console
mv plugin_thold /var/www/html/cacti/plugins
```
2) Now assign the proper permissions to the folder
2. Now assign the proper permissions to the folder
```console
chown -R apache:apache plugin_thold
```
```console
chown -R apache:apache plugin_thold
```
3) From `Console > Configuration > Plugins` Install the plugin
by Clicking on the wrench Icon as showng below.
3. From `Console > Configuration > Plugins` Install the plugin by Clicking on
the wrench Icon as showng below.
Below you will now see the THOLD plugin available to install in this case we are
installing thold
Below you will now see the THOLD plugin available to install in this case we
are installing thold
![thold plugin](images/thold-install.png)
![thold plugin](images/thold-install.png)
4) After installing the plugin by clicking on the grey gear you will now how
to enable it this can be done via clicking on the green check mark
4. After installing the plugin by clicking on the grey gear you will now how to
enable it this can be done via clicking on the green check mark
![thold plugin enable](images/thold-enable.png)
![thold plugin enable](images/thold-enable.png)
After this, the **Plugin** is installed and enabled. However, there
will likely be onfiguration that must take place after the **Plugin**
is enabled. See the **Plugin** documentation for instructions on how
to configure and use them.
After this, the **Plugin** is installed and enabled. However, there will likely
be onfiguration that must take place after the **Plugin** is enabled. See the
**Plugin** documentation for instructions on how to configure and use them.
### Updating a Plugin
## Updating a Plugin
Updating a plugin not only keeps you up to date with the latest release of the
code for that plugin. It also allows you to keep all of your settings for that
plugin ensure you DO NOT UNINSTALL the plugin. You must instead disable the
plugin ensure you DO NOT UNINSTALL the plugin. You must instead disable the
plugin which will not drop the SQL tables and thus save your settings.
1) Disable the **Plugin** you want to update
1. Disable the **Plugin** you want to update
2) Backup the current **Plugin** folder typically in
`<path_cacti>/plugins/plugin_name`
2. Backup the current **Plugin** folder typically in
`<path_cacti>/plugins/plugin_name`
```console
cp -R /var/www/html/cacti/plugin/thold /tmp
```
```console
cp -R /var/www/html/cacti/plugin/thold /tmp
```
3) git pull or download the new version of the **Plugin**
3. git pull or download the new version of the **Plugin**
```console
git pull
```
```console
git pull
```
4) Change name of **Plugin** folder i.e plugin_thold to thold
4. Change name of **Plugin** folder i.e plugin_thold to thold
```console
mv plugin_thold thold
```
```console
mv plugin_thold thold
```
5) Assign proper permissions usually either www-data for Ubuntu/debian or
apache for CentOS/RHEL
5. Assign proper permissions usually either www-data for Ubuntu/debian or apache
for CentOS/RHEL
```console
chown -R apache:apache thold
```
```console
chown -R apache:apache thold
```
6) Re-enable the **Plugin** in the **Console**
6. Re-enable the **Plugin** in the **Console**
#### Video Walkthrough
### Video Walkthrough
[![Video Tutorial ](http://img.youtube.com/vi/TPKu-2XYKok/0.jpg)](https://youtu.be/TPKu-2XYKok "Video Tutorial")
[![Video Tuturial](http://img.youtube.com/vi/TPKu-2XYKok/0.jpg)](https://youtu.be/TPKu-2XYKok)
### Unistall a Plugin
## Unistall a Plugin
To uninstall a plugin go into the plugins page
`Console > Configuration > Plugins` Click on the plugin to
Disable the plugin.
`Console > Configuration > Plugins` Click on the plugin to Disable the plugin.
Click on the red dot beside the plugin to uninstall the plugin a dialogue box
will appear now click uninstall.
@@ -96,10 +94,10 @@ This will uninstall the plugin from cacti but will NOT remove the files from the
server to do that you must manually remove the plugin until you remove the files
the plugin will show to be available to be installed.
> **WARNING**: Uninstalling a Cacti **Plugin** generally also removes any database
> tables that that **Plugin** created, which means your data! Before uninstalling
> **Plugins**, it would be wise to have a backup strategy in place in case you
> accidentally uninstall a **Plugin** and loose your data!
> **WARNING**: Uninstalling a Cacti **Plugin** generally also removes any
> database tables that that **Plugin** created, which means your data! Before
> uninstalling **Plugins**, it would be wise to have a backup strategy in place
> in case you accidentally uninstall a **Plugin** and loose your data!
### Dependecies in plugins
@@ -111,4 +109,5 @@ plugin.
![plugin dependencies](images/plugins-dependencies.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -183,4 +183,4 @@ Cacti Framework. It's stood the test of time now in it's 19th year
of existence in the Open Source world.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+19 -22
View File
@@ -24,8 +24,8 @@ Please see the official Cacti website for information, support, and updates.
A very special thanks to Tobi Oetiker, the creator of RRDtool and the very
popular MRTG. The users of Cacti - especially anyone who has taken the time to
create a bug report, or otherwise help fix a Cacti related problem. Also
to anyone who has contributed to supporting Cacti.
create a bug report, or otherwise help fix a Cacti related problem. Also to
anyone who has contributed to supporting Cacti.
Cacti is licensed under the GNU GPL:
@@ -34,17 +34,17 @@ the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
## Table of Contents
1. [Cacti Installation](README.md#cacti-installation)
This section contains information on how to install and/or upgrade the
Cacti system. It covers requirements, different platforms and the steps
needed to get your system working under normal circumstances.
This section contains information on how to install and/or upgrade the Cacti
system. It covers requirements, different platforms and the steps needed to
get your system working under normal circumstances.
2. [Cacti Overview](README.md#cacti-overview)
@@ -59,9 +59,9 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
4. [Plugin Development](README.md#plugin-development)
This section contains all Plugin development related information.
Guidelines, hooks, references, etc. More information can be found on
the [Cacti Forums](https://forums.cacti.net/viewforum.php?f=6).
This section contains all Plugin development related information. Guidelines,
hooks, references, etc. More information can be found on the
[Cacti Forums](https://forums.cacti.net/viewforum.php?f=6).
5. [How To's](README.md#how-tos)
@@ -94,7 +94,8 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
3.2. [Installation Under CentOS 7 - LEMP Stack](Install-Under-CentOS_LEMP.md)
3.3. [Installation Under Ubuntu/Debian - LAMP Stack](Installing-Under-Ubuntu-Debian.md)
3.3.
[Installation Under Ubuntu/Debian - LAMP Stack](Installing-Under-Ubuntu-Debian.md)
4. [Installing Under Windows](Installing-Under-Windows.md)
@@ -292,9 +293,6 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
1.[Syslog Plugin](syslog-plugin.md)
### How Tos
1. [How To Work with Templates](How-To-Work-With-Templates.md)
@@ -315,15 +313,13 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
9. [How To Setup SSH Tunnels](How-To-SSH-Tunnels.md)
10.[Enable SSL for Cacti](Cacti-SSL-Configuration.md)
10.[Enable SSL for Cacti](Cacti-SSL-Configuration.md)
11.[Graph a Single SNMP OID](Graph-a-Single-SNMP-OID.md)
11.[Graph a Single SNMP OID](Graph-a-Single-SNMP-OID.md)
## Watch Howto's and Tutorials on the Cacti Official YouTube page!.
### Video Tutorials
If you prefer to see some video based tutorials visit the Official Cacti YouTube channel.
If you would have any ideas for videos or would like to contribute let us know !
Watch Howto's and Tutorials on the Cacti Official YouTube page if you prefer. If you would have any ideas for videos or would like to contribute let us know !
[Cacti Official Youtube Channel](https://www.youtube.com/channel/UC6ROmUGuuLa9BdHWzvGSY1w)
@@ -356,4 +352,5 @@ This section will be for template specific configuration requriments
1. [Apache Server Template](apache_template_config.md)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -158,4 +158,4 @@ rrdp#
available through SNMP
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+229 -227
View File
@@ -1,51 +1,52 @@
# RRDtool Specific Features
Cacti supports most RRDtool features. In this chapter, many of those features,
and some Cacti implementation specifics around them will be discussed. As
Cacti supports most RRDtool features. In this chapter, many of those features,
and some Cacti implementation specifics around them will be discussed. As
RRDtool is a continually changing Times Series Database (TSDB) and **Graph**
rendering framework, this guide may be a little behind on all the RRDtool
features that Cacti supports.
## Database Data Types
There are several different Database **Data Types** that RRDfile supports.
They include all those listed below. Cacti claims to support all, but `COMPUTE`
There are several different Database **Data Types** that RRDfile supports. They
include all those listed below. Cacti claims to support all, but `COMPUTE`
remains untested.
Type | Supported | Description
--- | --- | ---
GAUGE | Yes | This is as the term refers to a floating point number that tracks the value reported directly. Unlike the COUNTER, it has not comprehension of past data.
COUNTER | Yes | This is a floating point number that tracks the different between samples to come up with effectively a rate calculation. Used for things like Traffic Graphs where the number reported in SNMP continually increases
DCOUNTER | Yes | This is the same as a COUNTER, but in Double Precision.
DERIVE | Yes | This data type measures the Rate of Change of a value, otherwise known as the first derivative to the value. As such, it relies on previous data in order to report the change.
DDERIVE | Yes | This is the same as the DERIVE, but in Double Precision
ABSOLUTE | Yes | Is for counters that get reset upon reading. This is often used for fast counters. It is also similar to the DERIVE, or acts very much like it.
COMPUTE | Yes | Though Cacti claims to support this Data Type. It's not clear that it's presently working.
| Type | Supported | Description |
| -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GAUGE | Yes | This is as the term refers to a floating point number that tracks the value reported directly. Unlike the COUNTER, it has not comprehension of past data. |
| COUNTER | Yes | This is a floating point number that tracks the different between samples to come up with effectively a rate calculation. Used for things like Traffic Graphs where the number reported in SNMP continually increases |
| DCOUNTER | Yes | This is the same as a COUNTER, but in Double Precision. |
| DERIVE | Yes | This data type measures the Rate of Change of a value, otherwise known as the first derivative to the value. As such, it relies on previous data in order to report the change. |
| DDERIVE | Yes | This is the same as the DERIVE, but in Double Precision |
| ABSOLUTE | Yes | Is for counters that get reset upon reading. This is often used for fast counters. It is also similar to the DERIVE, or acts very much like it. |
| COMPUTE | Yes | Though Cacti claims to support this Data Type. It's not clear that it's presently working. |
> **NOTE**: Presently `Holt-Winters Forecasting` is not supported in Cacti
> and The Cacti Group has no plans on supporting it. If you would like
> `Holt-Winters Forecasting` supported in Cacti, you will need to submit a
> pull request including documentation if you require it's functionality.
> **NOTE**: Presently `Holt-Winters Forecasting` is not supported in Cacti and
> The Cacti Group has no plans on supporting it. If you would like
> `Holt-Winters Forecasting` supported in Cacti, you will need to submit a pull
> request including documentation if you require it's functionality.
## GPRINT Presets
A GPRINT is a graph item type that enables you to print the values of data
sources on a graph. They are typically used to represent legend values on the
graph. The output format of these numbers are controlled by a printf-like
format string. Cacti enables you to keep a global list of these strings that
can be applied to any graph item throughout Cacti. You can see the list of
available formats described on the [RRDtool Website](https://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#PRINT).
graph. The output format of these numbers are controlled by a printf-like format
string. Cacti enables you to keep a global list of these strings that can be
applied to any graph item throughout Cacti. You can see the list of available
formats described on the
[RRDtool Website](https://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#PRINT).
### Creating a GPRINT Preset
To create a new GPRINT preset, select the Graph Management menu item under the
Management heading, and select GPRINT Presets. Click Add to the right and you
will be presented with an edit page containing two fields. Enter a name for
your GPRINT preset, and the actual printf-like string in the GPRINT Text field.
When you are finished, click the Create button to create your new GPRINT preset.
will be presented with an edit page containing two fields. Enter a name for your
GPRINT preset, and the actual printf-like string in the GPRINT Text field. When
you are finished, click the Create button to create your new GPRINT preset.
In the image below, you can see the default GPRINT Presets included in the
base Cacti. These generally cover just about all use cases presently.
In the image below, you can see the default GPRINT Presets included in the base
Cacti. These generally cover just about all use cases presently.
![Default Cacti GPRINT's](images/gprint-presets-default.png)
@@ -54,10 +55,11 @@ base Cacti. These generally cover just about all use cases presently.
CDEF's allow you to apply mathematical functions to graph data to alter output.
The concept of a CDEF comes straight from RRDtool, and are written in reverse
polish notation (RPN). For more information regarding the syntax of CDEF's,
check out the [CDEF tutorial](https://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html).
check out the
[CDEF tutorial](https://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html).
From the image below, you can see that Cacti provides a rich set of CDEF's out
of the box. These CDEF's can be imported and exported and are globally assigned
of the box. These CDEF's can be imported and exported and are globally assigned
for portability.
![Default Cacti CDEF's](images/cdefs-default.png)
@@ -65,63 +67,63 @@ for portability.
### Creating a CDEF
To create a new CDEF in Cacti, select CDEF's under `Console > Presets` sub-menu
section. Once at this screen, click Add to the right. You will be prompted for
a CDEF name, for which you can type anything used to describe your CDEF.
Click the Create button so you are redirected back to the edit page, now with
an empty CDEF Items box. Construct your CDEF by adding an item for each
element in the CDEF string, common types such as operators and functions
are enumerated for your convenience. Below is a basic description of each
CDEF item type. You can see from the image below that CDEF's follow a
Reverse Polish Notation (RPN), which was a very popular way of computing
back in the 70's and 80's when computing devices had much less memory.
However, RPN is elegant in it's simplicity.
section. Once at this screen, click Add to the right. You will be prompted for a
CDEF name, for which you can type anything used to describe your CDEF. Click the
Create button so you are redirected back to the edit page, now with an empty
CDEF Items box. Construct your CDEF by adding an item for each element in the
CDEF string, common types such as operators and functions are enumerated for
your convenience. Below is a basic description of each CDEF item type. You can
see from the image below that CDEF's follow a Reverse Polish Notation (RPN),
which was a very popular way of computing back in the 70's and 80's when
computing devices had much less memory. However, RPN is elegant in it's
simplicity.
![Default Cacti CDEF Example](images/cdefs-default-example.png)
###### Table 19-1. CDEF Item Types
Cacti provides several CDEF Item Types to represent a **Data Source**
in order to provide additional functionality. See below for the
documentation. Cacti presently does not allow you to specify a VNAME for
your DEFS, CDEF's and VDEF's, but instead uses a string pattern to assign
them. You will have to take note of then when creating a **Graph Template**.
Those Special Data Source types are documented below in the next few sections.
Cacti provides several CDEF Item Types to represent a **Data Source** in order
to provide additional functionality. See below for the documentation. Cacti
presently does not allow you to specify a VNAME for your DEFS, CDEF's and
VDEF's, but instead uses a string pattern to assign them. You will have to take
note of then when creating a **Graph Template**. Those Special Data Source types
are documented below in the next few sections.
Type | Description
--- | ---
Function | You can choose a CDEF function to use as the item. [The RRDtool's graph manual](https://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html#CDEF) describes the purpose of each CDEF function.
Operator | Just your standard math operators, including modulo (%).
Special Data Source | A special data source is basically a flag to tell Cacti to do some special processing when it encounters this CDEF item. The "Current Graph Item Data Source" type basically inserts the name of the data source that is referenced by the graph item that references to this CDEF. Both of the "All Data Sources" types insert a summation of all data sources used on a graph.
Another CDEF | You can recursively use another CDEF within this CDEF.
Custom String | Sometimes it's just easier to type out the literal CDEF string manually. When referencing to data sources on the graph, remember that Cacti names them 'a', 'b', 'c', '...', starting with the first data source on the graph.
| Type | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Function | You can choose a CDEF function to use as the item. [The RRDtool's graph manual](https://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html#CDEF) describes the purpose of each CDEF function. |
| Operator | Just your standard math operators, including modulo (%). |
| Special Data Source | A special data source is basically a flag to tell Cacti to do some special processing when it encounters this CDEF item. The "Current Graph Item Data Source" type basically inserts the name of the data source that is referenced by the graph item that references to this CDEF. Both of the "All Data Sources" types insert a summation of all data sources used on a graph. |
| Another CDEF | You can recursively use another CDEF within this CDEF. |
| Custom String | Sometimes it's just easier to type out the literal CDEF string manually. When referencing to data sources on the graph, remember that Cacti names them 'a', 'b', 'c', '...', starting with the first data source on the graph. |
## VDEF's
VDEF's provide greater functionality then their ancestor CDEF's and may be able to
replace some legacy Cacti functionality like Nth Percentile **Graph Template**
logic. They should be used whenever possible for your **Graph Templates**.
VDEF's provide greater functionality then their ancestor CDEF's and may be able
to replace some legacy Cacti functionality like Nth Percentile **Graph
Template** logic. They should be used whenever possible for your **Graph
Templates**.
You can see from the image below, that 95th percentile and total bandwidth
could be replace by using one of the VDEF's below.
You can see from the image below, that 95th percentile and total bandwidth could
be replace by using one of the VDEF's below.
![Default Cacti VDEF's](images/vdefs-default.png)
### Creating a VDEF
To create a new VDEF in Cacti, select VDEF's under `Console > Presets` sub-menu
section. Once at this screen, click Add to the right. You will be prompted
for a VDEF name, for which you can type anything used to describe your VDEF.
Click the Create button so you are redirected back to the edit page, now with
an empty VDEF Items box. Construct your VDEF by adding an item for each element
in the VDEF string, common types such as operators and functions are
enumerated for your convenience. Below is a basic description of each
VDEF item type. The image below shows an example VDEF for the Bandwidth
type VDEF.
section. Once at this screen, click Add to the right. You will be prompted for a
VDEF name, for which you can type anything used to describe your VDEF. Click the
Create button so you are redirected back to the edit page, now with an empty
VDEF Items box. Construct your VDEF by adding an item for each element in the
VDEF string, common types such as operators and functions are enumerated for
your convenience. Below is a basic description of each VDEF item type. The image
below shows an example VDEF for the Bandwidth type VDEF.
![Default Cacti VDEF Example](images/vdefs-default-example.png)
For additional information on CDEF's and VDEF's see that specific section
of the documentation. Additionally, you can find examples on the
For additional information on CDEF's and VDEF's see that specific section of the
documentation. Additionally, you can find examples on the
[RRDtool Website](https://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html#VDEF)
### Special Data Sources
@@ -131,65 +133,65 @@ vanilla RRDtool. Let's spend some few words of them to unleash their power.
###### Table 19-2. CDEF Special Data Source
Special Data Source | Description
--- | ---
Current Graph Item Data Source | Will be replaced by the DEF name of the RRDtool data source referred by the graph item this CDEF is associated to.
All Data Sources (Don't Include Duplicates) | Will add up all data sources of the whole graph to form a total. A data source that appears more than once will be counted only once. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source!
All Data Sources (Include Duplicates) | Will add up all data sources of the whole graph to form a total. A data source that appears more than once will be counted for each time of it's appearance. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source!
Similar Data Sources (Don't Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be totaled! Let's assume the data source is named "traffic_in". Then, cacti will add up all data sources "traffic_in" of the whole graph to form a data source specific total (e.g. Total traffic In). Data sources with different consolidation functions are counted as same data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted once)
Similar Data Sources (Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be totaled! If a data source appears multiple times, it will be added this many times.
Current Data Source Item: Minimum Value | Taken from the Data Template - Data Source Item related to this graph item: fetches the minimum value defined for the given data template. Caution: This is NOT the smallest entry of the given data source!
Current Data Source Item: Maximum Value | Taken from the Data Template - Data Source Item related to this graph item: fetches the maximum value defined for the given data template. Caution: This is NOT the highest entry of the given data source!
Graph: Lower Limit | Taken from the Graph Template: fetches the Lower Limit defined to the Graph Template. This is independent of all --alt-autoscaling options. It is NOT the dynamically determined lower boundary of the graph!
Graph: Upper Limit | Taken from the Graph Template: fetches the Upper Limit defined to the Graph Template. This is independent of all --alt-autoscaling options. It is NOT the dynamically determined upper boundary of the graph!
Count of All Data Sources (Don't Include Duplicates) | Will count the number of all data sources of the whole graph. A data source that appears more than once will be counted only once. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source!
Count of All Data Sources (Include Duplicates) | Will count the number of all data sources of the whole graph. A data source that appears more than once will be counted for each time of it's appearance. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source!
Count of Similar Data Sources (Don't Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be counted! Let's assume the data source is named "traffic_in". Then, cacti will count all data sources "traffic_in" of the whole graph. Data sources with different consolidation functions are counted as same data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted once)
Count of Similar Data Sources (Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be counted! If a data source appears multiple times, it will be counted this many times.
| Special Data Source | Description |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Current Graph Item Data Source | Will be replaced by the DEF name of the RRDtool data source referred by the graph item this CDEF is associated to. |
| All Data Sources (Don't Include Duplicates) | Will add up all data sources of the whole graph to form a total. A data source that appears more than once will be counted only once. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source! |
| All Data Sources (Include Duplicates) | Will add up all data sources of the whole graph to form a total. A data source that appears more than once will be counted for each time of it's appearance. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source! |
| Similar Data Sources (Don't Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be totaled! Let's assume the data source is named "traffic_in". Then, cacti will add up all data sources "traffic_in" of the whole graph to form a data source specific total (e.g. Total traffic In). Data sources with different consolidation functions are counted as same data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted once) |
| Similar Data Sources (Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be totaled! If a data source appears multiple times, it will be added this many times. |
| Current Data Source Item: Minimum Value | Taken from the Data Template - Data Source Item related to this graph item: fetches the minimum value defined for the given data template. Caution: This is NOT the smallest entry of the given data source! |
| Current Data Source Item: Maximum Value | Taken from the Data Template - Data Source Item related to this graph item: fetches the maximum value defined for the given data template. Caution: This is NOT the highest entry of the given data source! |
| Graph: Lower Limit | Taken from the Graph Template: fetches the Lower Limit defined to the Graph Template. This is independent of all --alt-autoscaling options. It is NOT the dynamically determined lower boundary of the graph! |
| Graph: Upper Limit | Taken from the Graph Template: fetches the Upper Limit defined to the Graph Template. This is independent of all --alt-autoscaling options. It is NOT the dynamically determined upper boundary of the graph! |
| Count of All Data Sources (Don't Include Duplicates) | Will count the number of all data sources of the whole graph. A data source that appears more than once will be counted only once. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source! |
| Count of All Data Sources (Include Duplicates) | Will count the number of all data sources of the whole graph. A data source that appears more than once will be counted for each time of it's appearance. Data sources that differ by consolidation functions only are NOT counted as different data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted only once). It is NOT required to associate the graph item to any data source! |
| Count of Similar Data Sources (Don't Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be counted! Let's assume the data source is named "traffic_in". Then, cacti will count all data sources "traffic_in" of the whole graph. Data sources with different consolidation functions are counted as same data sources (e.g. traffic_in:AVERAGE and traffic_in:MAX are counted once) |
| Count of Similar Data Sources (Include Duplicates) | It is REQUIRED to associate the graph item to the data source that shall be counted! If a data source appears multiple times, it will be counted this many times. |
While the `All Data Sources/Similar Data Sources` pseudo CDEF variables perform
*totaling*, the `Count All Data Sources/Count Similar Data Sources` pseudo CDEF
Variables simply *count* the occurrences of the related data sources. Thus, it
_totaling_, the `Count All Data Sources/Count Similar Data Sources` pseudo CDEF
Variables simply _count_ the occurrences of the related data sources. Thus, it
is easy to compute e.g. an average of all similar data sources by creating the
CDEF:
`CDEF=SIMILAR_DATA_SOURCES_NODUPS,COUNT_SIMILAR_DS_NODUPS,/`
`CDEF=SIMILAR_DATA_SOURCES_NODUPS,COUNT_SIMILAR_DS_NODUPS,/`
### Using Special Data Source
Let's have some examples:
This is the list of graph items defined. Please note, that Item numbers 17-20
are duplicates of Item numbers 1-4. Even if it usually does not make sense,
for this discussion it is very valuable. Item numbers 21-24 are related to a
are duplicates of Item numbers 1-4. Even if it usually does not make sense, for
this discussion it is very valuable. Item numbers 21-24 are related to a
`cdef=ALL_DATA_SOURCES_NODUPS`.
| Graph Item | Data Source | Graph Item Type | CF Type |
|:-----------|:-----------------------------------|----------------:|--------:|
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (No Task): AllDsNoDups | LINE1 | AVERAGE |
| Item # 22 | (No Task): Current: | GPRINT | LAST |
| Item # 23 | (No Task): Average: | GPRINT | AVERAGE |
| Item # 24 | (No Task): Maximum:[HR] | GPRINT | MAX |
| Graph Item | Data Source | Graph Item Type | CF Type |
| :--------- | :--------------------------------------- | --------------: | ------: |
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (No Task): AllDsNoDups | LINE1 | AVERAGE |
| Item # 22 | (No Task): Current: | GPRINT | LAST |
| Item # 23 | (No Task): Average: | GPRINT | AVERAGE |
| Item # 24 | (No Task): Maximum:[HR] | GPRINT | MAX |
And this is the rrd graph statement:
@@ -245,44 +247,43 @@ GPRINT:cdefca:AVERAGE:"Average:%8.2lf%s" \
GPRINT:cdefca:MAX:"Maximum:%8.2lf%sn"
```
The data sources are denoted by the letters `a` to `h`. `cdefca` represents
the important part. You surely notice, that all data sources using
consolidation function `AVERAGE` are taken into account while `MAX` is skipped.
Please pay attention to the data source denoted by `a`. Even though the data
source appears twice, the cdef shows it only once. This is due to the duplicate
suppression.
The data sources are denoted by the letters `a` to `h`. `cdefca` represents the
important part. You surely notice, that all data sources using consolidation
function `AVERAGE` are taken into account while `MAX` is skipped. Please pay
attention to the data source denoted by `a`. Even though the data source appears
twice, the cdef shows it only once. This is due to the duplicate suppression.
This is the list of graph items defined. Please note, that Item numbers 17-20
are duplicates of Item numbers 1-4. Even if it usually does not make sense, for
this discussion it is very valuable. Item numbers 21-24 are related to a
`cdef=ALL_DATA_SOURCES_DUPS`
| Graph Item | Data Source | Graph Item Type | CF Type |
|:-----------|:-----------------------------------|----------------:|--------:|
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (No Task): AllDsDups | LINE1 | AVERAGE |
| Item # 22 | (No Task): Current: | GPRINT | LAST |
| Item # 23 | (No Task): Average: | GPRINT | AVERAGE |
| Item # 24 | (No Task): Maximum:[HR] | GPRINT | MAX |
| Graph Item | Data Source | Graph Item Type | CF Type |
| :--------- | :--------------------------------------- | --------------: | ------: |
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (No Task): AllDsDups | LINE1 | AVERAGE |
| Item # 22 | (No Task): Current: | GPRINT | LAST |
| Item # 23 | (No Task): Average: | GPRINT | AVERAGE |
| Item # 24 | (No Task): Maximum:[HR] | GPRINT | MAX |
And this is the rrd graph statement:
@@ -350,32 +351,32 @@ of Item numbers 1-4. Item numbers 21-24 are related to a
`traffic_in` of the `1`. target (it does not matter, which target is chosen, as
long as you only choose a `traffic_in` data source)
| Graph Item | Data Source | Graph Item Type | CF Type |
|:-----------|:-----------------------------------|----------------:|--------:|
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (traffic_in): SimilarDsNoDups | LINE1 | AVERAGE |
| Item # 22 | (traffic_in): Current: | GPRINT | LAST |
| Item # 23 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 24 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Graph Item | Data Source | Graph Item Type | CF Type |
| :--------- | :--------------------------------------- | --------------: | ------: |
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (traffic_in): SimilarDsNoDups | LINE1 | AVERAGE |
| Item # 22 | (traffic_in): Current: | GPRINT | LAST |
| Item # 23 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 24 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
And this is the rrd graph statement:
@@ -451,35 +452,35 @@ well.
Again, please note, that Item numbers 17-20 are duplicates of Item numbers 1-4.
Item numbers 21-24 are related to a `cdef=SIMILAR_DATA_SOURCES_DUPS` and are
associated with the data source `traffic_in` of the `1` target (it does not
matter, which target is chosen, as long as you only choose a `traffic_in`
data source)
matter, which target is chosen, as long as you only choose a `traffic_in` data
source)
| Graph Item | Data Source | Graph Item Type | CF Type |
|:-----------|:-----------------------------------|----------------:|--------:|
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (traffic_in): SimilarDsDups | LINE1 | AVERAGE |
| Item # 22 | (traffic_in): Current: | GPRINT | LAST |
| Item # 23 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 24 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Graph Item | Data Source | Graph Item Type | CF Type |
| :--------- | :--------------------------------------- | --------------: | ------: |
| Item # 1 | (traffic_in): 1. Target Traffic In | LINE1 | AVERAGE |
| Item # 2 | (traffic_in): Current: | GPRINT | LAST |
| Item # 3 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 4 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 5 | (traffic_in): 2. Target Traffic In | LINE1 | AVERAGE |
| Item # 6 | (traffic_in): Current: | GPRINT | LAST |
| Item # 7 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 8 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 9 | (traffic_out): 1. Target Traffic Out | LINE1 | AVERAGE |
| Item # 10 | (traffic_out): Current: | GPRINT | LAST |
| Item # 11 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 12 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 13 | (traffic_out): 2. Target Traffic Out | LINE1 | AVERAGE |
| Item # 14 | (traffic_out): Current: | GPRINT | LAST |
| Item # 15 | (traffic_out): Average: | GPRINT | AVERAGE |
| Item # 16 | (traffic_out): Maximum:[HR] | GPRINT | MAX |
| Item # 17 | (traffic_in): 1. Target Again Traffic In | LINE1 | AVERAGE |
| Item # 18 | (traffic_in): Current: | GPRINT | LAST |
| Item # 19 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 20 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
| Item # 21 | (traffic_in): SimilarDsDups | LINE1 | AVERAGE |
| Item # 22 | (traffic_in): Current: | GPRINT | LAST |
| Item # 23 | (traffic_in): Average: | GPRINT | AVERAGE |
| Item # 24 | (traffic_in): Maximum:[HR] | GPRINT | MAX |
And this is the rrd graph statement:
@@ -544,13 +545,13 @@ twice in those CDEFs as expected.
### More CDEF Examples
This example is based on the standard data template `ucd/net - Hard Drive
Space`. Cacti ships an associated graph template named `ucd/net - Available
Disk Space`. Often, users complain about the fact, that this template prints
free and used space as absolute figures only. But instead of knowing, that your
data partition has about 10GB used space, you may be interested in the
percentage used. So let's create a simple example to show the power of the
recently introduced special data sources.
This example is based on the standard data template
`ucd/net - Hard Drive Space`. Cacti ships an associated graph template named
`ucd/net - Available Disk Space`. Often, users complain about the fact, that
this template prints free and used space as absolute figures only. But instead
of knowing, that your data partition has about 10GB used space, you may be
interested in the percentage used. So let's create a simple example to show the
power of the recently introduced special data sources.
To make it work, we need two new CDEFs. The first one may come in useful for a
bunch of different graph templates. It's named `Make Current Data Source 0`. On
@@ -565,17 +566,17 @@ Now, the other one, named `Current DS as Percentage of all DS`
`cdef=CURRENT_DATA_SOURCE,ALL_DATA_SOURCES_NODUPS,/,100,*`
Here's a short discussion. The first three elements read: Take the current data
source and divide it by `Sum of All Data Sources (Don't include
Duplicates)`. To form a percentage, you will have to multiply by 100. This is
done by adding the elements four and five.
source and divide it by `Sum of All Data Sources (Don't include Duplicates)`. To
form a percentage, you will have to multiply by 100. This is done by adding the
elements four and five.
Now, let's build up the new graph
| Graph Item | Data Source | Graph Item Type | CF Type | Item Color |
|:-----------|:-------------------|----------------:|--------:|:-----------|
| Item # 1 | (hdd_used): | LINE1 | AVERAGE | |
| Item # 2 | (hdd_free): | LINE1 | AVERAGE | |
| Item # 3 | (hdd_used): % Used | AREA | AVERAGE | FF0000 |
| :--------- | :----------------- | --------------: | ------: | :--------- |
| Item # 1 | (hdd_used): | LINE1 | AVERAGE | |
| Item # 2 | (hdd_free): | LINE1 | AVERAGE | |
| Item # 3 | (hdd_used): % Used | AREA | AVERAGE | FF0000 |
Item numbers 1 and 2 in most cases will exceed the maximum percentage of 100 by
magnitudes. So they are associated with the CDEF named
@@ -622,13 +623,13 @@ performs the percentage calculation.
You may of course add `GPRINT` legends as usual. If you do this for the "% Used"
entry only, you will get surprising results, if your RRDfile holds either
`MAXIMUM`, `LAST` and/or `MINIMUM` consolidation function(s). This is left as
an exercise to you :)
`MAXIMUM`, `LAST` and/or `MINIMUM` consolidation function(s). This is left as an
exercise to you :)
This set of CDEFs is used to colorize the background of a graph with different
colors for day, night and weekends. The CDEFs are created as usual, we will
show the CDEF definition only. Examples are taken from RRDtool-users mailing
list courtesy Erik de Mare. Here are the definitions
colors for day, night and weekends. The CDEFs are created as usual, we will show
the CDEF definition only. Examples are taken from RRDtool-users mailing list
courtesy Erik de Mare. Here are the definitions
#### Background for Daytime
@@ -636,7 +637,7 @@ list courtesy Erik de Mare. Here are the definitions
#### Background for Nighttime
cdef=LTIME,86400,%,28800,LT,INF,LTIME,86400,%,64800,GT,INF,UNKN,CURRENT_DATA_SOURCE,*,IF,IF`
cdef=LTIME,86400,%,28800,LT,INF,LTIME,86400,%,64800,GT,INF,UNKN,CURRENT_DATA_SOURCE,\*,IF,IF`
#### Background for Weekend
@@ -655,14 +656,15 @@ AREAs, select a color and opacity. Choose the `daytime`, `nighttime` and
items to the top. I've chosen opacity of `20%` for Item numbers 1 to 3.
| Graph Item | Data Source | Graph Item Type | CF Type | Item Color |
|:-----------|:--------------------------|----------------:|--------:|:-----------|
| Item # 1 | (proc): | AREA | AVERAGE | FFFF00 |
| Item # 2 | (proc): | AREA | AVERAGE | 0000FF |
| Item # 3 | (proc): | AREA | AVERAGE | 2E3127 |
| Item # 4 | (proc): Running Processes | AREA | AVERAGE | F51D30 |
| Item # 5 | (proc): Current: | GPRINT | LAST | |
| Item # 6 | (proc): Average: | GPRINT | AVERAGE | |
| Item # 7 | (proc): Maximum: | GPRINT | MAX | |
| :--------- | :------------------------ | --------------: | ------: | :--------- |
| Item # 1 | (proc): | AREA | AVERAGE | FFFF00 |
| Item # 2 | (proc): | AREA | AVERAGE | 0000FF |
| Item # 3 | (proc): | AREA | AVERAGE | 2E3127 |
| Item # 4 | (proc): Running Processes | AREA | AVERAGE | F51D30 |
| Item # 5 | (proc): Current: | GPRINT | LAST | |
| Item # 6 | (proc): Average: | GPRINT | AVERAGE | |
| Item # 7 | (proc): Maximum: | GPRINT | MAX | |
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+25 -18
View File
@@ -24,7 +24,7 @@ columns:
- **Last Run** - The last time that the Report was sent to the distribution.
- **Next Run** - The approximate next time that the report is to be sent.
this is not an exact number. It does depend on the poller first running. So,
depending on how long your poller runs for, this time could be off by a
depending on how long your poller runs for, this time could be off by a
few minutes.
- **From** - The From Name portion of the From Email address
- **To** - The list of Emails that the reports is to be sent to.
@@ -42,7 +42,8 @@ The actions that you can take on an existing Report as an Administrator include:
## Report Editing
When you click the Add button on the right side of the **Reports** page, or Click on the Report Name of an existing Report, you will be presented with the interface below.
When you click the Add button on the right side of the **Reports** page, or Click
the Report Name of an existing Report, you will be presented with the interface below.
![Reports Admin Edit](images/reports-edit-1.png)
@@ -50,9 +51,9 @@ This section includes:
- **Report Name** - The Name of the **Report**
- **Enable Report** - Is the **Report** Enabled
- **Use Custom Format HTML** - This is an indication that you wish to use a custom html/css
document that you can use to customize the layout of your reports and add
corporate branding for example.
- **Use Custom Format HTML** - This is an indication that you wish to use a
custom html/css document that you can use to customize the layout of your
reports and add corporate branding for example.
- **Format File to Use** - The specific html/css file to use.
- **Graphs Linked** - Provide the recipient of the report a ling back to the actual
graph in Cacti.
@@ -60,15 +61,19 @@ This section includes:
- **Graph Width** - The width of each Graph
- **Graph Height** - The height of each Graph
- **Thumbnails** - Should the Graphs be rendered in Thumbnail mode
- **Next Timestamp of Sending Mail Report** - The approximate next time to send out the
**Report**.
- **Report Interval** - The frequency to send the report. Options are every X Minute, Hours, Days, Weeks, Months on a Day of the Month, Months on the Day of the Week, and Years.
- **Interval Frequency** - How often to send, for example if you select Days, and the Interval is one, it means every day, if you select 2, it means every other day.
- **Next Timestamp of Sending Mail Report** - The approximate next time to send the report
- **Report Interval** - The frequency to send the report. Options are every X Minute,
Hours, Days, Weeks, Months on a Day of the Month, Months on the Day of the Week,
and Years.
- **Interval Frequency** - How often to send, for example if you select Days,
and the Interval is one, it means every day, if you select 2,
it means every other day.
The **Email Frequency** section does not use the same layout as does our **Automation Networks**.
Correcting that is a future project for the team.
The **Email Frequency** section does not use the same layout as does our
**Automation Networks**. Correcting that is a future project for the team.
The last section of the **Report Details** is the **Email Sender/Receiver** section as shown below.
The last section of the **Report Details** is the **Email Sender/Receiver**
section as shown below.
![Reports Admin Edit](images/reports-edit-2.png)
@@ -80,15 +85,17 @@ From here you can set the following columns.
- **To Email Address(es)** - A comma delimited list of Email addresses that should
receive the Report.
- **BCC Address(es)** - An anonymized list of Email recipients
- **Image attach type** - This defines how the Cacti Graph images get attached to the
Email. Maybe are for legacy purposes. Most users will use Inline PNG or Inline JPG.
- **Image attach type** - This defines how the Cacti Graph images get attached
to the Email. Maybe are for legacy purposes. Most users will use
Inline PNG or Inline JPG.
Once you save a new **Report** additional Tabs will show up. Those tabs are:
- **Items** - The Graph's, Tree's, Text, Horizontal Rules, and Device's to place on the Report.
- **Items** - The Graph's, Tree's, Text, Horizontal Rules,
and Device's to place on the Report.
- **Preview** - See a Preview of your Report
- **Events** - Approximate Future Event Days for your Report to be sent. This helps interpret
the idiosyncrasies of the scheduler design.
- **Events** - Approximate Future Event Days for your Report to be sent.
This helps interpret the idiosyncrasies of the scheduler design.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+2 -2
View File
@@ -1,6 +1,6 @@
# Report Events
On this page, you can simply see on what dates and approximate times that the
On this page, you can simply see on what dates and approximate times that the
**Reports** scheduler will send future report. You can see from the image below
this the report will be sent every day at approximately 09:18:30. The poller frequency
or Data Collector interval is 30 seconds on this system.
@@ -11,4 +11,4 @@ Currently Cacti does not record past events in a Database table or store the pub
report in either PDF or other document format in a Database for historical reference.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+40 -22
View File
@@ -6,10 +6,14 @@ From this Sub-Tab, you can add, remove, and if **Drag and Drop** is enabled, eas
reorder any **Report Item**. **Report Items** include:
- **Trees** - Including one or more Branches, which include Devices as a Branch Type.
- **Graphs** - One or more Graphs from a Device.
- **Devices** - One or more Cacti Devices with Graphs whose titles may include a Regular
Expression.
- **Devices** - One or more Cacti Devices with Graphs whose titles
may include a Regular Expression.
- **Text** - For example to sub-section a Report and add a Title
- **Horizontal Rule** - For separating sections of a **Report**.
An example **Report Items** interface can be seen below.
@@ -22,25 +26,29 @@ something about Interface Graphs and Disk Utilization Graphs.
## Item Edit Page
When you either add a new Item by pressing the Add button on the right, or Clicking on the
Item # on the left, you will be presented a page that is personalized depending on the *Item Type*. When you add an item for the first time, you will see the image below.
When you either add a new Item by pressing the Add button on the right,
Clicking on the Item # on the left, you will be presented a page
that is personalized depending on the *Item Type*.
When you add an item for the first time, you will see the image below.
![Report Item New Item](images/reports-item-new.png)
Again, the user interface will change layout depending on the *Item Type* that you select
which happens to be the first drop-down on that page.
Again, the user interface will change layout depending on the *Item Type*
that you select which happens to be the first drop-down on that page.
The columns for a **Graph** Type **Report Item** include:
- **Site** - A filter that will show only Devices and Graphs from a specific site.
- **Device Template** - A filter that will only show Devices and Graphs from a
- **Device Template** - A filter that will only show Devices and Graphs from a
specific Device Template
- **Device** - A filter that will show only Graphs from a specific Device.
- **Graph Template** - A filter that will show only Graphs from a specific Graph Template.
- **Graph Template** - A filter that will show only Graphs
from a specific Graph Template.
The options above are only Filter to reduce the Graph list when you actually select the
**Graph Name**, it will apply those filters to narrow in on the Graphs to display in the
drop-down. All of the filters above are *optional*.
The options above are only Filter to reduce the Graph list when you
actually select the **Graph Name**, it will apply those filters
to narrow in on the Graphs to display in the drop-down.
All of the filters above are *optional*.
The last sections are for the specific Graph in question including:
@@ -49,14 +57,14 @@ The last sections are for the specific Graph in question including:
- **Alignment** - Should the Graph be Center, Left or Right Aligned on the page.
- **Sequence** - The Graph Items Sequence number. This is a Read Only variable.
When, you change the **Report Item** to **Device** the layout of the page will change and
you will see the form shown below.
When, you change the **Report Item** to **Device** the layout of the page will
change and you will see the form shown below.
![Report Item Device Item](images/reports-item-device.png)
In this case, the **Site**, and **Device Template** both remain Filters, and the **Device**
represents the **Device** to include on the **Report**. After that, the options below
define what Graphs from the Device are to be included.
In this case, the **Site**, and **Device Template** both remain Filters, the **Device**
represents the **Device** to include on the **Report**.
After that, the options below define what Graphs from the Device are to be included.
- **Graph Template** - Either Any Graph Template, or a Specific Graph Template.
- **Graph Name Regular Expression** - A regular expression that limits the **Graphs**
@@ -65,7 +73,9 @@ define what Graphs from the Device are to be included.
- **Alignment** - Should the Graph be Center, Left or Right Aligned on the page.
- **Sequence** - The Graph Items Sequence number. This is a Read Only variable.
The last **Report Item** that we will document here is the **Tree** type. The Text and Horizontal Rule types are pretty much self explanitory. The image below is the layout that will be shown
The last **Report Item** that we will document here is the **Tree** type.
The Text and Horizontal Rule types are pretty much self explanitory.
The image below is the layout that will be shown
when you change the **Report Item** to **Tree**.
![Report Item Tree Item](images/reports-item-tree.png)
@@ -73,14 +83,22 @@ when you change the **Report Item** to **Tree**.
In this case, there are no filter, just selections. They include:
- **Graph Tree** - The name of the Cacti Tree to include in the report.
- **Graph Tree Branch** - The specific Branch to include if you are only wanting to include a
portion of the **Tree**
- **Graph Tree Branch** - The specific Branch to include
if you are only wanting to include aportion of the **Tree**
- **Cascade to Branches** - Walk all the **Graph Trees** branches
- **Graph Name Regular Expression** - A MySQL/MariaDB compatible Regular Expression of Graph Names
to include in the Report.
- **Graph Name Regular Expression** - A MySQL/MariaDB compatible Regular
Expression of Graph Names to include in the Report.
- **Graph Timespan** - The time range to show for the Graph.
- **Alignment** - Should the Graph be Center, Left or Right Aligned on the page.
- **Sequence** - The Graph Items Sequence number. This is a Read Only variable.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -22,4 +22,4 @@ Regardless of the page type, when you select this option, upon clicking the *Go*
From there, select your destination Report, Timespan, and Alignment.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+4 -4
View File
@@ -2,10 +2,10 @@
This section will describe the **Report Preview** Sub-Tab.
From this Sub-Tab, you will be able to preview the **Report** leveraging the
From this Sub-Tab, you will be able to preview the **Report** leveraging the
**Format File** if you included one on the **Details** sub-tab. The rendering may actually
be different depending on the Email client your recipient uses. So, it's best
to send the reports to the recipients using the **Send Report** option in the upper
be different depending on the Email client your recipient uses. So, it's best
to send the reports to the recipients using the **Send Report** option in the upper
right corner of the image below.
![Report Preview](images/reports-preview.png)
@@ -13,4 +13,4 @@ right corner of the image below.
There is not too much more to speak about on this Sub-Tab.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+42 -30
View File
@@ -8,8 +8,8 @@ manage others reports in addition to your own.
## The Web Interface
The user of any **Report** begins on the main Reports tab in Cacti.
A screen shot of the Reports tab is shown below.
The user of any **Report** begins on the main Reports tab in Cacti. A screen
shot of the Reports tab is shown below.
![Reports User Tab](images/reports-admin-tab.png)
@@ -20,10 +20,10 @@ columns:
- **Owner** - The Cacti account that has ownership of the Report.
- **Frequency** - How often the Report is to be sent to the distribution.
- **Last Run** - The last time that the Report was sent to the distribution.
- **Next Run** - The approximate next time that the report is to be sent.
this is not an exact number. It does depend on the poller first running. So,
depending on how long your poller runs for, this time could be off by a
few minutes.
- **Next Run** - The approximate next time that the report is to be sent. this
is not an exact number. It does depend on the poller first running. So,
depending on how long your poller runs for, this time could be off by a few
minutes.
- **From** - The From Name portion of the From Email address
- **To** - The list of Emails that the reports is to be sent to.
- **Type** - The Image format and the type of embedding done in the Email.
@@ -39,7 +39,9 @@ The actions that you can take on an existing Report as an Administrator include:
## Report Editing
When you click the Add button on the right side of the **Reports** page, or Click on the Report Name of an existing Report, you will be presented with the interface below.
When you click the Add button on the right side of the **Reports** page, or
Click on the Report Name of an existing Report, you will be presented with the
interface below.
![Reports User Edit](images/reports-edit-1.png)
@@ -47,45 +49,55 @@ This section includes:
- **Report Name** - The Name of the **Report**
- **Enable Report** - Is the **Report** Enabled
- **Use Custom Format HTML** - This is an indication that you wish to use a custom html/css
document that you can use to customize the layout of your reports and add
corporate branding for example.
- **Use Custom Format HTML** - This is an indication that you wish to use a
custom html/css document that you can use to customize the layout of your
reports and add corporate branding for example.
- **Format File to Use** - The specific html/css file to use.
- **Graphs Linked** - Provide the recipient of the report a ling back to the actual
graph in Cacti.
- **Graphs Linked** - Provide the recipient of the report a ling back to the
actual graph in Cacti.
- **Graph Columns** - The number of Graph columns to use per row.
- **Graph Width** - The width of each Graph
- **Graph Height** - The height of each Graph
- **Thumbnails** - Should the Graphs be rendered in Thumbnail mode
- **Next Timestamp of Sending Mail Report** - The approximate next time to send out the
**Report**.
- **Report Interval** - The frequency to send the report. Options are every X Minute, Hours, Days, Weeks, Months on a Day of the Month, Months on the Day of the Week, and Years.
- **Interval Frequency** - How often to send, for example if you select Days, and the Interval is one, it means every day, if you select 2, it means every other day.
- **Next Timestamp of Sending Mail Report** - The approximate next time to send
out the **Report**.
- **Report Interval** - The frequency to send the report. Options are every X
Minute, Hours, Days, Weeks, Months on a Day of the Month, Months on the Day of
the Week, and Years.
- **Interval Frequency** - How often to send, for example if you select Days,
and the Interval is one, it means every day, if you select 2, it means every
other day.
The **Email Frequency** section does not use the same layout as does our **Automation Networks**.
Correcting that is a future project for the team.
The **Email Frequency** section does not use the same layout as does our
**Automation Networks**. Correcting that is a future project for the team.
The last section of the **Report Details** is the **Email Sender/Receiver** section as shown below.
The last section of the **Report Details** is the **Email Sender/Receiver**
section as shown below.
![Reports Admin Edit](images/reports-edit-2.png)
From here you can set the following columns.
- **Subject** - The Email subject.
- **From Name** - The From Name on the Email. For example **Cacti Administrator**
- **From Email Address** - The From Email address. For example *noreply@mydomain.com*
- **To Email Address(es)** - A comma delimited list of Email addresses that should
receive the Report.
- **From Name** - The From Name on the Email. For example **Cacti
Administrator**
- **From Email Address** - The From Email address. For example
`noreply@mydomain.com`
- **To Email Address(es)** - A comma delimited list of Email addresses that
should receive the Report.
- **BCC Address(es)** - An anonymized list of Email recipients
- **Image attach type** - This defines how the Cacti Graph images get attached to the
Email. Maybe are for legacy purposes. Most users will use Inline PNG or Inline JPG.
- **Image attach type** - This defines how the Cacti Graph images get attached
to the Email. Maybe are for legacy purposes. Most users will use Inline PNG or
Inline JPG.
Once you save a new **Report** additional Tabs will show up. Those tabs are:
Once you save a new **Report** additional Tabs will show up. Those tabs are:
- **Items** - The Graph's, Tree's, Text, Horizontal Rules, and Device's to place on the Report.
- **Items** - The Graph's, Tree's, Text, Horizontal Rules, and Device's to place
on the Report.
- **Preview** - See a Preview of your Report
- **Events** - Approximate Future Event Days for your Report to be sent. This helps interpret
the idiosyncrasies of the scheduler design.
- **Events** - Approximate Future Event Days for your Report to be sent. This
helps interpret the idiosyncrasies of the scheduler design.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -224,4 +224,4 @@ paste them into my.cnf
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -19,4 +19,4 @@ Important: When performing a network scan ensure that you select the SNMP
options that contain the SNMP strings you want to use
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+5 -5
View File
@@ -9,7 +9,7 @@ if you wish to use this authentication method, it is recommended that
you test your configuration on a development server before putting this
method into production.
> **NOTE**: Before enabling the **Basic Authentication Method**, you must
> **NOTE**: Before enabling the **Basic Authentication Method**, you must
> always verify that you are prompted for a password before getting the
> normal Cacti login prompt, and that you have setup a new user account
> with Admin privileges that matches your login account. Otherwise
@@ -47,10 +47,10 @@ UNIX login account may be `jschmoe`, which grants you certain
plugin permissions, like controlling your own workload.
The mapfile is a file in CSV format, with the first column
being the Basic account (aka joe.schmoe@company.com), and the second
column being the login account (jschmoe). It is up-to the Cacti
administrator to manage and update this file per their local
being the Basic account (aka joe.schmoe@company.com), and the second
column being the login account (jschmoe). It is up-to the Cacti
administrator to manage and update this file per their local
site practices.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+13 -13
View File
@@ -67,7 +67,7 @@ LDAP authentication.
```domain\<username>```
2. _Anonymous Searching_ - In this routine, Cacti connects to LDAP with no
2._Anonymous Searching_ - In this routine, Cacti connects to LDAP with no
authentication and attempts to perform a search for the _username_, in an
attempt to retrieve the specific DN associated with the username. Once
the specific DN of the username is found, Cacti binds to LDAP using the DN of
@@ -75,7 +75,7 @@ LDAP authentication.
default, Microsoft's Active Directory does not permit anonymous searches, and
will refuse the search request.
3. _Specific Searching_ - In this routine, Cacti binds to LDAP using a service
3.Specific Searching_- In this routine, Cacti binds to LDAP using a service
account that was provided beforehand, then performs a search for the
_username_, in an attempt to retrieve the specific DN associated with the
username. Once the specific DN of the username is found, Cacti binds to LDAP
@@ -126,18 +126,18 @@ The following three settings determine the content of the compare request.
1. _Group Distinguished Name (DN)_ - The DN of the group into which the
directory server should search for attributes. For example:
```
```html
CN=cacti-admins,OU=Admin_Groups,OU=Groups,DC=corp,DC=company,DC=com
```
2. _Group Member Attribute_ - The name of the attribute into which the
2.Group Member Attribute_ - The name of the attribute into which the
directory server should search for the user. For example:
```bash
member
```
3. _Group Member Type_ - The format of the text string which should represent
3.Group Member Type_ - The format of the text string which should represent
the user.
### Specific Search Settings
@@ -167,10 +167,10 @@ But more complex filers are also permitted, such as:
,DC=corp,DC=company,DC=com))
```
3. _Search Distinguished Name (DN)_ - The username of the service account with
3.Search Distinguished Name (DN)_ - The username of the service account with
which Cacti will bind to the directory.
4. _Search Password_ - The password of the service account with which Cacti
4.Search Password_ - The password of the service account with which Cacti
will bind to the directory.
### LDAP CN Settings
@@ -239,8 +239,8 @@ To handle this scenario, start by creating a new local user in Cacti with
read-only permissions. Name the user 'MyLdapTemplate'. Next, in Cacti's
Authentication settings, set the `User Template` field to 'MyLdapTemplate'.
Set the `Mode` to 'No Searching'. Set the `Distinguished Name (DN)` field to
'<username>@example.com', where 'example.com' is the name of your domain. When
any user logs in to Cacti, their password will be checked against the LDAP
```<username>@example.com'```, where 'example.com' is the name of your domain.
When any user logs in to Cacti, their password will be checked against the LDAP
directory and they'll be granted access to Cacti with read-only access (from
the LDAP template user). Once a new user logs in, Cacti will create a local
user where the user's `Realm` is 'LDAP'. You may then optionally promote that
@@ -258,8 +258,8 @@ authorized users.
To handle this scenario by manually authorizing users within Cacti, navigate to
the Authentication settings, and set the `User Template` field to 'No User'.
Set the `Mode` to 'No Searching'. Set the `Distinguished Name (DN)` field to
'<username>@example.com', where 'example.com' is the name of your domain.
Set the `Mode` to 'No Searching'. Set the `Distinguished Name (DN)` field t
```<username>@example.com```, where 'example.com' is the name of your domain.
Next, navigate to the `Users` page and create a new user where the username
matches the username in the directory. Set the user's `Realm` to 'LDAP'.
Grant your desired permissions to the user. When that user logs in to Cacti,
@@ -280,7 +280,7 @@ Name (DN)` to the name of the group. Set `Group Member Attribute` to 'member'.
Set `Group Member Type` to 'Distinguished Name'. Set `Search Base` to the DN
of the hierarchical structure in the directory which contains all the users,
such as 'OU=Users,DC=example,DC=com'. Set `Search Filter` to
'sAMAccountName=<username>'. Set `Search Distinguished Name (DN)` to the
```'sAMAccountName=<username>'```. Set `Search Distinguished Name (DN)` to the
username of the service account you created in the directory. Set `Search
Password` to the password for the service account. Optionally, set `Full Name`
to the directory attribute that contains the user's name, such as 'cn', and
@@ -288,4 +288,4 @@ also set `Email` to the directory attribute that contains the user's email
address, such as 'mail'.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+3 -3
View File
@@ -8,8 +8,8 @@ database, and are stored in a method where they are not easily compromised.
## Local Account Complexity Requirements
Additionally, Cacti has the ability to remember password history, force
complexity rules, minimum lengths, force change frequency, etc. on new
Additionally, Cacti has the ability to remember password history, force
complexity rules, minimum lengths, force change frequency, etc. on new
passwords. These settings are configurable as well. The image below
shows the local complexity settings available in Cacti.
@@ -46,4 +46,4 @@ The settings are fairly self explanatory, so additional detail is no
provided here.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+4 -4
View File
@@ -3,7 +3,7 @@
## Overview
Cacti provides four Authentication methods that can be leveraged to provide
Authentication services. When combined with the variety of Apache and NGINX
Authentication services. When combined with the variety of Apache and NGINX
Modules, Cacti can support just about every Authentication method available
today in the industry. Those Authentication method include:
@@ -46,10 +46,10 @@ Those options include:
- **User Template**, when creating new accounts, either LDAP, Web Basic,
or new Cacti local accounts, Cacti will pull the users default Authorization
from this Template User account. For some Cacti **Authentication Methods**,
you can have more than one Template User, for example:
you can have more than one Template User, for example:
**Multiple LDAP/AD Domains**.
In the sections below, we will go over these various
In the sections below, we will go over these various
**Authentication Methods** and their settings.
[Built-in Authentication](Settings-Auth-Local.md)
@@ -61,4 +61,4 @@ In the sections below, we will go over these various
[Multiple LDAP/AD Authentication](Settings-Domains.md)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+2 -2
View File
@@ -61,7 +61,7 @@ Those settings include:
- **Number of RRDfile Checker Processes** - For very large Cacti installs
the **RRDfile Checker** can take quite a long time to complete.
This setting allows Cacti to perform the checks at orders of magnitude faster.
This setting allows Cacti to perform the checks at orders of magnitude faster.
- **Check Frequency** - This setting determines how often
checks should be executed. You can set
@@ -125,4 +125,4 @@ The settings above include:
connection to the RRD Proxy service.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+30 -28
View File
@@ -1,48 +1,48 @@
# Device Default Settings
Cacti has multiple ways to create **Devices**. Those methods include:
Cacti has multiple ways to create **Devices**. Those methods include:
- **Manual** - Create Devices one at a time through the User Interface
- **CLI** - Through Cacti's Command Line Interfaces (CLI's)
- **Automation** - Through Cacti's Network Discovery
When using any of these methods, Cacti needs a way to apply a default
for a new **Device** if the user does not specify on, be it any of the
three methods above. That is what this settings sub-tab if for.
When using any of these methods, Cacti needs a way to apply a default for a new
**Device** if the user does not specify on, be it any of the three methods
above. That is what this settings sub-tab if for.
## General Defaults
In the image below, you can see the **General Defaults**. These settings
cover a number of **Device** attributes.
In the image below, you can see the **General Defaults**. These settings cover a
number of **Device** attributes.
![General Defaults](images/settings-device-defaults-general.png)
Those settings include:
- **Template** - The default **Device Template**. You might select `Net-SNMP`
- **Template** - The default **Device Template**. You might select `Net-SNMP`
device if you are monitoring all Linux devices for example.
- **Site** - The default physical location of the **Device**
- **Poller** - The default **Data Collector** to assign new **Devices** to
- **Device Threads** - The default number of Device Threads to assign to a
new **Device**
- **Device Threads** - The default number of Device Threads to assign to a new
**Device**
- **Re-index Method for Data Queries** - The default **Re-index" method for
new **Device** **Data Queries**
- **Re-index Method for Data Queries** - The default **Re-index" method for new
**Device Data Queries**
- **Default Interface Speed** - If the **Device** does not include
`ifHighSpeed` what should the maximum speed of the interface be set to.
- **Default Interface Speed** - If the **Device** does not include `ifHighSpeed`
what should the maximum speed of the interface be set to.
> **NOTE**: **Device Threads** is only applicable when using the spine binary
## SNMP Defaults
Similar to the `General Defaults`, the `SNMP Defaults` control what SNMP
settings to use for new **Devicess* if the user does not specify any.
The image below shows the settings when using first SNMP v2 and then SNMP v3.
If you are using SNMP v1 or v2, you will have much less required settings.
settings to use for new \*_Devicess_ if the user does not specify any. The image
below shows the settings when using first SNMP v2 and then SNMP v3. If you are
using SNMP v1 or v2, you will have much less required settings.
![SNMP Defaults](images/settings-device-defaults-snmp-defaults-v1v2.png)
@@ -80,12 +80,12 @@ Those settings include:
## Availability / Reachability
Cacti's `Availability / Reachability` define how to perform initial checks prior
to polling to see if the **Device** is alive or not. Attempting to gather large
to polling to see if the **Device** is alive or not. Attempting to gather large
amounts of data from a **Device** that is down, is counter-productive.
Availability / Reachability is generally performned using a `ping`. These
`pings` come in many formats, and Cacti supports all of the reasonable ones.
In the image below, you can see the settings for one of the combination cases.
Availability / Reachability is generally performned using a `ping`. These
`pings` come in many formats, and Cacti supports all of the reasonable ones. In
the image below, you can see the settings for one of the combination cases.
Depending on your `ping` method, you may receive less options.
![SNMP Defaults](images/settings-device-defaults-availability.png)
@@ -93,19 +93,20 @@ Depending on your `ping` method, you may receive less options.
Those options include:
- **Downed Device Detection** - The method by which Cacti should `ping` the
**Device**, SNMP `pings` involve querying a specific OID. Options include:
**Device**, SNMP `pings` involve querying a specific OID. Options include:
- **None** - Only used for devices having their data collected through a
back-end agent
- **Ping and SNMP uptime** - Perform a TCP/UDP/ICMP ping and then check
uptime through SNMP. Both methods must work for the device to be **Up**
- **Ping and SNMP uptime** - Perform a TCP/UDP/ICMP ping and then check uptime
through SNMP. Both methods must work for the device to be **Up**
- **Ping or SNMP Uptime** - If either method works, consider the **Device Up**
- **SNMP Uptime** - Only check the SNMP sysUptimeInstance of the **Device**
- **SNMP Desc** - Only check the SNMP sysDescription of the **Device**
- **SNMP getNext** - Only perform a basic `getnext` query for the **Device**
- **Ping** - Either TCP, UDP, or ICMP pings
- **Ping Type** - When using an options that leverages **Ping** above, which method
- **Ping Type** - When using an options that leverages **Ping** above, which
method
- **Ping Port** - When using TCP or UDP ping, the port to ping
@@ -118,11 +119,12 @@ Those options include:
The Up / Down Settings define how many polling cycles that a Device must not
respond to be considered truly `Down`, and when at device is returning from
`Down`, how many polling cycles to keep a device in `Recovering` state before
returning it to `Up`. The image below shows the two settings for the
**Device**. There is really no reason to explain these two settings in any
additional detail.
returning it to `Up`. The image below shows the two settings for the **Device**.
There is really no reason to explain these two settings in any additional
detail.
![SNMP Defaults](images/settings-device-defaults-updown.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+2 -2
View File
@@ -3,7 +3,7 @@
## Summary
This Authentication method enables the Cacti Administrator to
have multiple login level templates for their accounts. This
have multiple login level templates for their accounts. This
could be used to grant users say for the following three login
levels controlled by an LDAP or AD User Group:
@@ -32,4 +32,4 @@ The reason that it shows settings for `Built-in` accounts is that
you can still login as a local account when you choose this setting.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+7 -7
View File
@@ -39,12 +39,12 @@ Those settings include:
- **General Log Level** - This is the level of logging that Cacti will use.
Options include:
- **NONE** - Don't perform any logging, not recommended.
- **LOW** - Statistics and Errors
- **MEDIUM** - Statistics, Errors and Results
- **HIGH** - Statistics, Errors, Results and Major I/O Events
- **DEBUG** - Statistics, Errors, Results, I/O and Program Flow
- **DEVEL** - Developer level messages, mainly **SQL Queries**
- **NONE** - Don't perform any logging, not recommended.
- **LOW** - Statistics and Errors
- **MEDIUM** - Statistics, Errors and Results
- **HIGH** - Statistics, Errors, Results and Major I/O Events
- **DEBUG** - Statistics, Errors, Results, I/O and Program Flow
- **DEVEL** - Developer level messages, mainly **SQL Queries**
Select the log level that works best for your logging needs. Be advised that
**DEBUG** generates a large amount of log data. **DEVEL** should only log
@@ -215,4 +215,4 @@ This is where Cacti obtains defaults for **Graph Templates**.
**Graph Templates**
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+83 -82
View File
@@ -1,101 +1,102 @@
# Mail/Reporting/DNS Settings
This area of Cacti is where you configure core notification settings as
well as settings to using alternate DNS' servers associated with certain
Cacti plugins.
This area of Cacti is where you configure core notification settings as well as
settings to using alternate DNS' servers associated with certain Cacti plugins.
## URL Linking
The URL Linking settings provide the Cacti administrator a URL prefix
that will point properly to the main Cacti site for both core Cacti
functions and Plugins to create URL for their use. Generally this
URL should include the full DNS name of the Cacti server, and the
correct protocol, for example HTTPS. The image below show an example
of how this might be setup.
The URL Linking settings provide the Cacti administrator a URL prefix that will
point properly to the main Cacti site for both core Cacti functions and Plugins
to create URL for their use. Generally this URL should include the full DNS name
of the Cacti server, and the correct protocol, for example HTTPS. The image
below show an example of how this might be setup.
![PHP Mail Function](images/settings-mrd-urls.png)
## Mail Settings
Not only Cacti, but several plugins today are still leveraging Email
for end user and administrative notification. Cacti uses the very
popular PHP-Mailer 3rd party component to facilitate Email
notification service. In this section, you will pick the method
that you wish to provide Email notification an it's settings. Cacti
actually provides three methods. They include:
Not only Cacti, but several plugins today are still leveraging Email for end
user and administrative notification. Cacti uses the very popular PHP-Mailer 3rd
party component to facilitate Email notification service. In this section, you
will pick the method that you wish to provide Email notification an it's
settings. Cacti actually provides three methods. They include:
- **PHP Mail Function** - PHP has a built-in mail facility where PHP will
communicate with the localhost mail facilities to send mail. This is useful if
your Cacti system is setup as an anonymous forwarder to a corporate mail
system.
- **Sendmail Binary** - This method relies on the `sendmail` binary to properly
communicate with your corporate mail systems. Like the **PHP Mail Function**,
it requires that your localhost be properly setup to send mail through a
forwarding setup.
- **PHP Mail Function** - PHP has a built-in mail facility where
PHP will communicate with the localhost mail facilities to send
mail. This is useful if your Cacti system is setup as an
anonymous forwarder to a corporate mail system.
- **Sendmail Binary** - This method relies on the `sendmail` binary
to properly communicate with your corporate mail systems. Like
the **PHP Mail Function**, it requires that your localhost be
properly setup to send mail through a forwarding setup.
- **Simple Mail Transfer Protocol (SMTP)** - This is the most configurable
option where Cacti can send Emails directly to the Email server.
In the sections below, we will document each of these options in more
details.
In the sections below, we will document each of these options in more details.
## Emailing Options
In this section, you specify some general settings around Emailing
in general as shown in the image below.
In this section, you specify some general settings around Emailing in general as
shown in the image below.
![PHP Mail Function](images/settings-mrd-php-mail.png)
Those settings include:
- **Notify Primary Admin of Issues** - When certain anomalous Cacti
events table place that justify the notification of the Cacti
administrator, by checking this option, you will receive those
notifications.
- **Test Email** - When setting up Cacti for the first time, or when
your Email settings change, you can send out a test Email to
confirm that the Email setup is working. The Email that you put on
this line will receive the test Email.
- **Mail Services** - This is where you pick one of the three options
above for providing Mail Services.
- **Ping Mail Server** - When using the SMTP Mail Services provider,
Cacti can first ping the Email Server to ensure that it's operational
before sending Emails. If the Email Server does not respond, Cacti
will issue a warning and continue operations.
- **From Email Address** - The is the Default From Email address that
will be used by Cacti and it's plugins, unless the plugin allows
overriding the option. The common entry would be something of the
form noreply@mydomain.com unless you have a desire to receive responses
from recipients.
- **From Name** - This setting allows you to provide a name to the
given Email address. Something of the form `Cacti Administrator` would
be common practice here.
- **Word Wrap** - If not using HTML based Emailing, this will force a
word wrap on text data at the length specified.
- **Notify Primary Admin of Issues** - When certain anomalous Cacti events table
place that justify the notification of the Cacti administrator, by checking
this option, you will receive those notifications.
- **Test Email** - When setting up Cacti for the first time, or when your Email
settings change, you can send out a test Email to confirm that the Email setup
is working. The Email that you put on this line will receive the test Email.
- **Mail Services** - This is where you pick one of the three options above for
providing Mail Services.
- **Ping Mail Server** - When using the SMTP Mail Services provider, Cacti can
first ping the Email Server to ensure that it's operational before sending
Emails. If the Email Server does not respond, Cacti will issue a warning and
continue operations.
- **From Email Address** - The is the Default From Email address that will be
used by Cacti and it's plugins, unless the plugin allows overriding the
option. The common entry would be something of the form `noreply@mydomain.com`
unless you have a desire to receive responses from recipients.
- **From Name** - This setting allows you to provide a name to the given Email
address. Something of the form `Cacti Administrator` would be common practice
here.
- **Word Wrap** - If not using HTML based Emailing, this will force a word wrap
on text data at the length specified.
The next sections will document the various **Mail Services**
### PHP Mail Function
There are no settings for this function. It leverages the Cacti servers
mail configuration to send mail notification.
There are no settings for this function. It leverages the Cacti servers mail
configuration to send mail notification.
### Sendmail Binary
The **Sendmail Binary** is similar to the **PHP Mail Function** with the exception
that you can specify the `sendmail` binary path. Cacti actually requires
that you include this path.
The **Sendmail Binary** is similar to the **PHP Mail Function** with the
exception that you can specify the `sendmail` binary path. Cacti actually
requires that you include this path.
![Sendmail Binary](images/settings-mrd-sendmail.png)
### Simple Mail Transfer Protocol (SMTP)
As mentioned before, the SMTP Mail Services provider provides the most options
and will be very familiar and easy to use for Cacti Administrators that
may not be as familiar with how to configure the Operating System to properly
forward mail to their internal Email servers. Popular mail services like
Google, Microsoft, etc. are all supported. This is primarily due to the use
of the 3rd Party PHP-Mailer plugin within Cacti. The image below shows the
various settings for the **Simple Mail Transfer Protocol (SMTP)** option.
and will be very familiar and easy to use for Cacti Administrators that may not
be as familiar with how to configure the Operating System to properly forward
mail to their internal Email servers. Popular mail services like Google,
Microsoft, etc. are all supported. This is primarily due to the use of the 3rd
Party PHP-Mailer plugin within Cacti. The image below shows the various settings
for the **Simple Mail Transfer Protocol (SMTP)** option.
![SMTP Mail](images/settings-mrd-smtp.png)
@@ -103,38 +104,38 @@ Those options include:
- **SMTP Hostname** - The hostname or DNS name of the SMTP Server
- **SMTP Port** - The TCP Port to use to communicate with the SMTP Server
- **SMTP Username** - The username to use for SMTP communications if your
SMTP Server requires authentication.
- **SMTP Password** - The password to use for SMTP communications if you
SMTP Server requires authentication.
- **SMTP Security** - The security protocol to use for SMTP communications.
The options include: None, SSL, and TLS. The most popular being TLS
today due to all the security issues with the other protocols.
- **SMTP Timeout** - How long to wait before abandoning connection attempts
to the SMTP Server.
- **SMTP Username** - The username to use for SMTP communications if your SMTP
Server requires authentication.
- **SMTP Password** - The password to use for SMTP communications if you SMTP
Server requires authentication.
- **SMTP Security** - The security protocol to use for SMTP communications. The
options include: None, SSL, and TLS. The most popular being TLS today due to
all the security issues with the other protocols.
- **SMTP Timeout** - How long to wait before abandoning connection attempts to
the SMTP Server.
## Reporting Presets
Cacti Reporting can generate very large Email attachments. Therefore
the **Reporting Presets** allow you to control the traffic associated
with reporting. From here, you can also set presets for the image type
and logging. You can see the settings from the image below.
Cacti Reporting can generate very large Email attachments. Therefore the
**Reporting Presets** allow you to control the traffic associated with
reporting. From here, you can also set presets for the image type and logging.
You can see the settings from the image below.
![Reporting Presets](images/settings-mrd-report-presets.png)
Since these settings are strait forward, no further explanation is
given here.
Since these settings are strait forward, no further explanation is given here.
## DNS Options
The DNS Options allow you to specify a primary and secondary DNS to use
for Plugin DNS operations. Many plugins allow you to even use their
own DNS Options. For plugins that require Alternate/Non-System DNS
settings, see their documentation as to how DNS is setup and used.
The DNS Options allow you to specify a primary and secondary DNS to use for
Plugin DNS operations. Many plugins allow you to even use their own DNS Options.
For plugins that require Alternate/Non-System DNS settings, see their
documentation as to how DNS is setup and used.
The image below shows the two settings.
![DNS Options](images/settings-mrd-dns-options.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -121,4 +121,4 @@ Those settings include:
- **Archive directory** - The Archive directory to move old RRDfile to.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -99,4 +99,4 @@ fairly self explanatory.
![Image Caching](images/settings-boost-image-cache.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -186,4 +186,4 @@ Those settings include:
exceeds this timeout, it will generate a log message.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+50 -50
View File
@@ -1,69 +1,69 @@
# Spike Kill Settings
# Spike Kill
Certain types of RRDtool based **Data Sources** can from time
to time generate what are look like to the casual observer
spikes. These spikes can make your Cacti **Graphs** unreadable.
Certain types of RRDtool based **Data Sources** can from time to time generate
what are look like to the casual observer spikes. These spikes can make your
Cacti **Graphs** unreadable.
Spike happen when you either have set no maximum value on your
Cacti **Data Template** by using a 'U' as the Maximum Value,
or when certain `COUNTER` based RRDfiles have their counter data
overflow, and start counting again from zero. When this happens
recent versions of RRDtool, like version 1.7, handle these
overflows quite well, but for some older RRDtool versions, these
changes can result in these spikes.
Spike happen when you either have set no maximum value on your Cacti **Data
Template** by using a 'U' as the Maximum Value, or when certain `COUNTER` based
RRDfiles have their counter data overflow, and start counting again from zero.
When this happens recent versions of RRDtool, like version 1.7, handle these
overflows quite well, but for some older RRDtool versions, these changes can
result in these spikes.
There are also cases where for some reason the Cacti system goes
offline, and therefore your Cacti Graphs will develop what are
referred to as gaps.
There are also cases where for some reason the Cacti system goes offline, and
therefore your Cacti Graphs will develop what are referred to as gaps.
## Spike Kill Settings
Cacti provides two gap filling options
from the user interface. In the image below, you can see
the default Settings for Cacti's Spike Killer GUI.
Cacti provides two gap filling options from the user interface. In the image
below, you can see the default Settings for Cacti's Spike Killer GUI.
![Settings Spike Kill](images/settings-spikekill.png)
Those settings include:
- **Removal Method** - Cacti supports both Variance and Standard
Deviation methods. When calculating those values, you have the
ability to filter out outliers such that they don't negatively
impact those calculations.
- **Replacement Method** - When filling the Gap, what data point
should be used. There is `Last Known Good`, which would be
the last good known value, `Average`, which uses the Average
value for the RRDfile data source, and `NaN's` which will cause
the **Graph** to gap, but the spikes will be removed.
- **Removal Method** - Cacti supports both Variance and Standard Deviation
methods. When calculating those values, you have the ability to filter out
outliers such that they don't negatively impact those calculations.
- **Replacement Method** - When filling the Gap, what data point should be used.
There is `Last Known Good`, which would be the last good known value,
`Average`, which uses the Average value for the RRDfile data source, and
`NaN's` which will cause the **Graph** to gap, but the spikes will be removed.
- **Number of Standard Deviations** - This is the number of
`Standard Deviations` above the Average that are required
before the value is considered a spike. It only applies to
the `Standard Deviation` spike removal method.
- **Variance Percentage** - When using the `Variance` spike
detection method, the percentage above variance before
considering a value a spike.
- **Variance Number of Outliers** - The number of high values
to ignore when calculating the Variance.
- **Max Kills Per RRA** - The maximum number of spike to remove
from any given RRDfile Data Source.
- **RRDfile Backup Directory** - If you wish to backup RRDfiles
that have been altered by Spike Kill, they will be placed in
this directory.
`Standard Deviations` above the Average that are required before the value is
considered a spike. It only applies to the `Standard Deviation` spike removal
method.
##Batch Spike Kill Settings
- **Variance Percentage** - When using the `Variance` spike detection method,
the percentage above variance before considering a value a spike.
Cacti also allows administrators to kill Cacti spikes on a periodic
basis using a batch process. From this batch process, you select
the time of day, the **Graph Templates** to perform Spike Kill operations
on, and the backup retention for RRDfiles that have spikes removed from
them. The image below shows those settings.
- **Variance Number of Outliers** - The number of high values to ignore when
calculating the Variance.
- **Max Kills Per RRA** - The maximum number of spike to remove from any given
RRDfile Data Source.
- **RRDfile Backup Directory** - If you wish to backup RRDfiles that have been
altered by Spike Kill, they will be placed in this directory.
## Batch Spike Kill Settings
Cacti also allows administrators to kill Cacti spikes on a periodic basis using
a batch process. From this batch process, you select the time of day, the
**Graph Templates** to perform Spike Kill operations on, and the backup
retention for RRDfiles that have spikes removed from them. The image below shows
those settings.
![Settings Spike Kill Batch](images/settings-spikekill-batch.png)
Of note is that first of all, the only **Graph Templates** that are
shown are **Graph Templates** that include `COUNTER` type **Data Sources**.
It is also worth noting that only **Data Query** type **Graph Templates**
are supported as of the current Cacti version.
Of note is that first of all, the only **Graph Templates** that are shown are
**Graph Templates** that include `COUNTER` type **Data Sources**. It is also
worth noting that only **Data Query** type **Graph Templates** are supported as
of the current Cacti version.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -1,4 +1,4 @@
# Configuration - Users, User Groups, and User Domains
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+67 -53
View File
@@ -1,18 +1,18 @@
# Visual Settings
# Overview
## Overview
Cacti's Visual settings page is where you can go to globally control
the behavior of Cacti's GUI. Settings like the default Theme, the
maximum allowed size of a Graph Title, auto-complete settings, as well
as a myriad of other settings can be found here.
Cacti's Visual settings page is where you can go to globally control the
behavior of Cacti's GUI. Settings like the default Theme, the maximum allowed
size of a Graph Title, auto-complete settings, as well as a myriad of other
settings can be found here.
The Visual page is broken down into several sub-sections. We will
cover them and the meaning of the various settings here.
The Visual page is broken down into several sub-sections. We will cover them and
the meaning of the various settings here.
> **NOTE**: This is a popular page for Plugin developers to augment.
> Therefore, if you have installed Plugins, your Settings page may
> look different than the default page.
> **NOTE**: This is a popular page for Plugin developers to augment. Therefore,
> if you have installed Plugins, your Settings page may look different than the
> default page.
## Theme, Table, Tree, and Filter Settings
@@ -23,16 +23,23 @@ The image below shows the default layout for these sub-sections.
Those settings include:
- **Theme** - The default theme that users logging into Cacti receive
- **Rows Per Page** - For all standard Cacti tables, the number of rows to
show per page.
- **Rows Per Page** - For all standard Cacti tables, the number of rows to show
per page.
- **Auto-complete Enabled** - Many drop-downs do not scale well with thousands
of items. In those cases, Cacti has enabled a drop-down auto-complete feature
most large installs should leverage it. However, if you are a small install
of items. In those cases, Cacti has enabled a drop-down auto-complete feature
most large installs should leverage it. However, if you are a small install
you can choose to disable auto-complete.
- **Auto-complete Rows** - The maximum rows to show in an auto-complete response.
- **Auto-complete Rows** - The maximum rows to show in an auto-complete
response.
- **Minimum Tree Width** - The minimum width of the Tree panel in Cacti
- **Maximum Tree Width** - The maximum width of the Tree panel in Cacti. Above
- **Maximum Tree Width** - The maximum width of the Tree panel in Cacti. Above
this width, tree items will scroll into the panel.
- **Strip Domains from Device Drop-downs** - Strip domain names from Device
drop-downs to save horizontal filter space.
@@ -46,22 +53,27 @@ Those settings include:
- **Maximum Title Length** - The maximum length of a Graph or Data Source title.
Titles above this length will be clipped.
- **Data Source Field Length** - When applying |query_*| replacement values, the
maximum supported length of those variables. Variables longer than this will
be clipped.
- **Data Source Field Length** - When applying |query\_\*| replacement values,
the maximum supported length of those variables. Variables longer than this
will be clipped.
- **Default Graph Type** - When on the **New Graphs** page, which **Graph Type**
filter should be the default. With **Device Templates** with many
**Data Queries** or **Graph Templates**, this page can become very long.
Allowing you to select your preferred **Graph Type** makes navigating the
page easier.
filter should be the default. With **Device Templates** with many **Data
Queries** or **Graph Templates**, this page can become very long. Allowing you
to select your preferred **Graph Type** makes navigating the page easier.
- **Default Log Tail Lines** - When viewing the Cacti Log, how many lines should
appear per page.
- **Maximum number of rows per page** - The maximum number of regular expression
search matches to display, when searching.
- **Log Tail Refresh** - The frequency that the log pages should auto-refresh.
- **Exclusion Reg-ex** - This setting allows you to exclude certain log messages
by regular expression from normal users. Expressions that include login
log entries are common here to mask the login accounts of users.
by regular expression from normal users. Expressions that include login log
entries are common here to mask the login accounts of users.
## Realtime and RRDtool Graph Options
@@ -72,40 +84,42 @@ The image below shows the default layout for these sub-sections.
Those settings include:
- **Enable Real-time Graphing** - Allow Realtime graphs to be used in Cacti.
- **Graph Time-span** - The default system level `Graph Timespan` use use
when a user opens a Realtime **Graph** for the first time.
- **Refresh Interval** - The default system level `Refresh Interval` for
the Realtime interface when a user first opens a Realtime **Graph**.
- **Cacti Directory** - Where should Cacti cache Realtime PNG's and
RRDfiles.
- **Custom Watermark** - A watermark that will appear on every Cacti
**Graph**
- **Disable RRDtool Watermark** - Every RRDtool Graph includes a vertical
watermark. This option allows you to disable that.
- Font Selection Method** - This allows the system administrator to
control, at a global level, how various text elements on RRDtool
**Graphs** appear. The settings include: Theme, or System. When
choosing `System`, your settings page will expand where you will
then have additional control.
> **NOTE**: The RRDtool Watermark control requires a recent version of
> RRDtool, such as the 1.7 release. If you attempt to use this setting
> and your **Graphs** break, then upgrade RRDtool.
- **Graph Time-span** - The default system level `Graph Timespan` use use when a
user opens a Realtime **Graph** for the first time.
- **Refresh Interval** - The default system level `Refresh Interval` for the
Realtime interface when a user first opens a Realtime **Graph**.
- **Cacti Directory** - Where should Cacti cache Realtime PNG's and RRDfiles.
- **Custom Watermark** - A watermark that will appear on every Cacti **Graph**
- **Disable RRDtool Watermark** - Every RRDtool Graph includes a vertical
watermark. This option allows you to disable that.
- **Font Selection Method** - This allows the system administrator to control,
at a global level, how various text elements on RRDtool **Graphs** appear. The
settings include: Theme, or System. When choosing `System`, your settings page
will expand where you will then have additional control.
> **NOTE**: The RRDtool Watermark control requires a recent version of RRDtool,
> such as the 1.7 release. If you attempt to use this setting and your
> **Graphs** break, then upgrade RRDtool.
## Font Selection Options
The image below shows the available Font Selection options when you
override the Theme settings.
The image below shows the available Font Selection options when you override the
Theme settings.
![Font Selection Options](images/settings-visual-4.png)
The sizes are in pixels, and the Font Settings can either be a
True Type Font file path, or a valid Pango font-config value.
For more information on Pango font-config values, see your
operating systems documentation. However, you can normally
see all the fonts installed on your Linux system by issuing
the following command `fc-list`.
The sizes are in pixels, and the Font Settings can either be a True Type Font
file path, or a valid Pango font-config value. For more information on Pango
font-config values, see your operating systems documentation. However, you can
normally see all the fonts installed on your Linux system by issuing the
following command `fc-list`.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -61,4 +61,4 @@ that it uses, the Cacti Group has recommended a sub-tab called
conform to that guideline.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -29,4 +29,4 @@ particular site.
![cacti sites automation](images/site-automation.png).
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -159,4 +159,4 @@ before older spikes in a different RRA, since the thresholds are different per
RRA:DS pair.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+42 -41
View File
@@ -1,67 +1,67 @@
# Spine
Spine is the fast replacement for `cmd.php`. It is written in C to ensure
ultimate performance for device polling and is multi-threaded. Expect a
decrease in polling time of an order of magnitude. Polling times far
less than 60 seconds for about 20,000 data sources are achievable e.g.
on a dual XEON system supplied with 4 GB RAM and standard local disks.
ultimate performance for device polling and is multi-threaded. Expect a decrease
in polling time of an order of magnitude. Polling times far less than 60 seconds
for about 20,000 data sources are achievable e.g. on a dual XEON system supplied
with 4 GB RAM and standard local disks.
When using Spine, don't change crontab or systemd settings! Always use
poller.php with crontab or cactid.php for systemd!
To activate Spine instead of cmd.php, please visit
`Console > Configuration > Settings > Poller` and select spine and save
as the `Poller Type`. If it's not showing as an available `Poller Type`
this means either it has not been installed, or it's path has not
been defined on the `Paths` tab within Settings.
`Console > Configuration > Settings > Poller` and select spine and save as the
`Poller Type`. If it's not showing as an available `Poller Type` this means
either it has not been installed, or it's path has not been defined on the
`Paths` tab within Settings.
Once saved, poller.php will use Spine on all subsequent polling cycles.
Before making this change, ensure that Spine runs properly from the
command line using the following test:
Once saved, poller.php will use Spine on all subsequent polling cycles. Before
making this change, ensure that Spine runs properly from the command line using
the following test:
```console
cd /usr/local/spine/bin
./spine -R -V 3 -S
```
You should receive quite a bit of output depending on the size of your
system. To increase the number of Threads and concurrent processes,
you must modify the setting when editing your Data Collector under
You should receive quite a bit of output depending on the size of your system.
To increase the number of Threads and concurrent processes, you must modify the
setting when editing your Data Collector under
`Console > Data Collection > Data Collectors`.
While Spine is really fast, choosing the correct setup will ensure that all
processor resources are used. Required settings for Maximum Concurrent Poller
Processes are 1-2 times the number of CPU cores available for Spine.
When using spine, you must be senstivive to the numer of connections that
are available for MySQL or MariaDB. Under
When using spine, you must be senstivive to the numer of connections that are
available for MySQL or MariaDB. Under
`Console > Utilities > System Utilities > General` Cacti will provide a
recommended `max_connection` for MySQL/MariaDB.
###### Table 15-1. Spine Parameters maintained at the System Level
Name | Description
--- | ---
Script and Script Server Timeout Value | The maximum time that Spine will wait on a script to complete, in units of seconds. If a Script Server Script is terminated due to timeout conditions, the value entered into the RRDfile will be NaN
| Name | Description |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Script and Script Server Timeout Value | The maximum time that Spine will wait on a script to complete, in units of seconds. If a Script Server Script is terminated due to timeout conditions, the value entered into the RRDfile will be NaN |
###### Table 15-2. Spine Parameters maintained at the Data Collector Level
Name | Description
--- | ---
Maximum Threads per Process | The maximum threads allowed per process. Using a higher number when using Spine will improve performance. Required settings are 10-15. Values above 50 are most often insane and may degrade performance vs. improve it.
Number of PHP Script Servers | The number of concurrent script server processes to run per Spine process. Settings between 1 and 10 are accepted. Script Servers will pre-load a PHP environment. Then, the Script Server Scripts are included into that environment to save the overhead of reloading PHP and re-interpreting the binary for each call.
| Name | Description |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Maximum Threads per Process | The maximum threads allowed per process. Using a higher number when using Spine will improve performance. Required settings are 10-15. Values above 50 are most often insane and may degrade performance vs. improve it. |
| Number of PHP Script Servers | The number of concurrent script server processes to run per Spine process. Settings between 1 and 10 are accepted. Script Servers will pre-load a PHP environment. Then, the Script Server Scripts are included into that environment to save the overhead of reloading PHP and re-interpreting the binary for each call. |
###### Table 15-3. Spine Parameters maintained at the Device Level
Name | Description
--- | ---
The Maximum SNMP OIDs Per SNMP Get Request | The maximum number of SNMP get OIDs to issue per SNMP request. Increasing this value increases poller performance over slow links. The maximum value is 60 OIDs, but that value is highly dependent on the MTU for your links to the remote devices. In some cases, using a **Remote Data Collector** is much more effective for polling remote **Davices**. Additionally, some **Device Types** do not handle large SNMP OID get requests. It's best to experiment until you find the correct setting.
Device Threads | The maximum number spine threads used to gather information from a **Device**. When using this setting at the **Device** level, you have to ensure that you have enough threads allocated to a process so as to not block other **Devices** being polled from the same spine binary.
| Name | Description |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The Maximum SNMP OIDs Per SNMP Get Request | The maximum number of SNMP get OIDs to issue per SNMP request. Increasing this value increases poller performance over slow links. The maximum value is 60 OIDs, but that value is highly dependent on the MTU for your links to the remote devices. In some cases, using a **Remote Data Collector** is much more effective for polling remote **Davices**. Additionally, some **Device Types** do not handle large SNMP OID get requests. It's best to experiment until you find the correct setting. |
| Device Threads | The maximum number spine threads used to gather information from a **Device**. When using this setting at the **Device** level, you have to ensure that you have enough threads allocated to a process so as to not block other **Devices** being polled from the same spine binary. |
### Installing Spine
As Spine is written in C is must be compiled on the local system that it is to
be installed on below is an example of compiling on centos and Ubuntu
be installed on below is an example of compiling on centos and Ubuntu
### Ubuntu
@@ -135,14 +135,14 @@ chmod u+s /usr/local/spine/bin/spine
### Testing/Debugging spine via command line
spine offer a a few different ways at the command line to test its functionality.
Here are a few examples of some tests you can run by executing spine.
spine offer a a few different ways at the command line to test its
functionality. Here are a few examples of some tests you can run by executing
spine.
#### Test Spine without writing results to database
This test allows you to run spine and display the results to the console.
This will not commit any of the data to the database by specifying the -R
option.
This test allows you to run spine and display the results to the console. This
will not commit any of the data to the database by specifying the -R option.
```shell
/usr/local/spine/bin# ./spine -R -V 5
@@ -203,10 +203,9 @@ SPINE: Using spine config file [../etc/spine.conf]
#### Spine debug via GUI
You are also able to view spine debug information via the log file
also spine allows you to raise the level of detail it provides in the log
if you want to debug a specific device and see the spine output click enable
device debug.
You are also able to view spine debug information via the log file also spine
allows you to raise the level of detail it provides in the log if you want to
debug a specific device and see the spine output click enable device debug.
Below is an example output of Spine debug info via the log file
@@ -217,8 +216,8 @@ To enable more detailed spine logging go to
You can choose from Detailed,Summary or No logging for Invalid data
Detailed Logging will be similar to cmd.php in that you will get a report
for each data source that is having an issue
Detailed Logging will be similar to cmd.php in that you will get a report for
each data source that is having an issue
Summary provides a count of how many data sources are having an issue per device
@@ -237,11 +236,13 @@ Ensure that you have spine.conf in /usr/local/spine/etc on first install
DEBUG Falling back to UDP Ping Due to SetUID Issues
```
This is a permissions issue with spine ensure you have give spine the proper permissions
This is a permissions issue with spine ensure you have give spine the proper
permissions
```shell
chmod u+s /usr/local/spine/bin/spine
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -461,4 +461,4 @@ PHP DocBlock specifications as follow:
Place a space between the `@param` and `@return`.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+106 -110
View File
@@ -3,29 +3,28 @@
## Introduction
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.
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.
## Reporting corrections / omissions
Please report any errors or corrections on the Cacti Documentation
GitHub repository which is located at
Please report any errors or corrections on the Cacti Documentation GitHub
repository which is located at
[https://github.com/cacti/documentation/](https://github.com/cacti/documentation/)
where all changes can be tracked. Any **Pull Requests** will be welcome
to help speed up changes by allowing the Cacti Group to simply verify
the changes are correct before submitting them.
where all changes can be tracked. Any **Pull Requests** will be welcome to help
speed up changes by allowing the Cacti Group to simply verify the changes are
correct before submitting them.
## Copyright
All documentation should be marked as copyright to the Cacti Group.
This is done by simply adding the following text to the bottom of the
page (including the blank line):
All documentation should be marked as copyright to the Cacti Group. This is done
by simply adding the following text to the bottom of the page (including the
blank line):
```markdown
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
```
## Titles
@@ -36,49 +35,53 @@ When creating documentation titles, they should:
- use the \# symbol with 1 - 5 hashes
*The actual count of hashes represents the sub-level of the title.*
_The actual count of hashes represents the sub-level of the title._
- not have multiple level 1 headers
```MD025 Multiple top level headers in the same document```
`MD025 Multiple top level headers in the same document`
- not have punctuation at the end of the header
```MD026 Trailing punctuation in header```
`MD026 Trailing punctuation in header`
- not use `----` or `====` on a line that follows a header
```MD003 Header style```
`MD003 Header style`
- increment down only one sub-level at a time
*You may go back up any number of levels*
_You may go back up any number of levels_
```markdown
# Main Title 1
## Main Title 1.Sub Title 1
### Main Title 1.Sub Title 1.Sub Title 1
### Main Title 1.Sub Title 1.Sub Title 2
## Main Title 1.Sub Title 2
### Main Title 1.Sub Title 2.Sub Title 1
### Main Title 1.Sub Title 2.Sub Title 2
# Main Title 2
### Main Title 2.Invalid Sub Title 1.Invalid Sub Title 1
## Main Title 1.Sub Title 1
### Main Title 1.Sub Title 1.Sub Title 1
### Main Title 1.Sub Title 1.Sub Title 2
## Main Title 1.Sub Title 2
### Main Title 1.Sub Title 2.Sub Title 1
### Main Title 1.Sub Title 2.Sub Title 2
# Main Title 2
### Main Title 2.Invalid Sub Title 1.Invalid Sub Title 1
```
- not use other title definition symbols
*Whilst they are valid markdown, they will result in style errors.*
_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.
Failure to follow this will result in an `MD001` error during Travis CI checks.
###### Example 1. Incorrect Markdown for Title Levels
```markdown
# Welcome
Welcome to us
@@ -90,13 +93,11 @@ To use most functions of our software, navigate the menus
#### Accessing the menus 1.2.1.1
The menus are located at the top of the page ...
```
###### Example 2. Corrected Markdown for Title Levels
```markdown
# Welcome
Welcome to us
@@ -108,34 +109,33 @@ To use most functions of our software, navigate the menus
### Accessing the menus 1.2.1
The menus are located at the top of the page ...
```
### Title Spacing
All titles should be separated with blank lines either side of the
title. The only exception to this is if the title is on the first line
of the page. They should also have a single space between the hash
symbols and text.
All titles should be separated with blank lines either side of the title. The
only exception to this is if the title is on the first line of the page. They
should also have a single space between the hash symbols and text.
###### Example 3. Incorrect Markdown for Title Spacing
```markdown
# Welcome
Welcome to us
## Using the software 1.2
To use most functions of our software, navigate the menus
### Accessing the menus 1.2.1
The menus are located at the top of the page ...
To use most functions of our software, navigate the menus
### Accessing the menus 1.2.1
The menus are located at the top of the page ...
```
###### Example 4. Correct Markdown for Title Spacing
```markdown
# Welcome
Welcome to us
@@ -147,28 +147,23 @@ To use most functions of our software, navigate the menus
### Accessing the menus 1.2.1
The menus are located at the top of the page ...
```
### Titles for Captions
Titles for examples, images and tables are the only exception to the
Title Level rule. These are normally set to 6 (Six) hash symbols (e.g.,
`######`). The format of the text should be such that it reads the type
of caption, a number, full stop, then the description
Titles for examples, images and tables are the only exception to the Title Level
rule. These are normally set to 6 (Six) hash symbols (e.g., `######`). The
format of the text should be such that it reads the type of caption, a number,
full stop, then the description
```markdown
###### <caption type> <number>. <description>
```
###### Example 5. Example of this caption
```markdown
###### Example 5. Example of this caption
```
## Text
@@ -177,29 +172,29 @@ of caption, a number, full stop, then the description
Any text written outside of code blocks must:
- be formatted such that it does not exceed 79 characters. This is to
make it easier to read and adjust the paragraphs in any editor.
- be formatted such that it does not exceed 79 characters. This is to make it
easier to read and adjust the paragraphs in any editor.
```MD013 Line length```
`MD013 Line length`
- have blank lines between paragraphs
- not have multiple blank lines
```MD012 Multiple consecutive blank lines```
`MD012 Multiple consecutive blank lines`
- not have trailing spaces
```MD009 Trailing spaces```
`MD009 Trailing spaces`
- not use HTML outside of fenced code blocks
```MD033 Inline HTML```
`MD033 Inline HTML`
### Tables
All tables should have a caption applied to them in the style that was
listed above.
All tables should have a caption applied to them in the style that was listed
above.
### Lists
@@ -209,26 +204,27 @@ All lists should:
- use the same indentation for the same level
```MD005 Inconsistent indentation for list items at the same level```
`MD005 Inconsistent indentation for list items at the same level`
- start at the beginning of a line (no spaces/indents) for the top level
```MD006 Consider starting bulleted lists at the beginning of the line```
`MD006 Consider starting bulleted lists at the beginning of the line`
- use a digit following by a full stop for numbered lists
- should have a single space between the list item marker and the start of the text
- should have a single space between the list item marker and the start of the
text
- have blanks lines around items in the same fashion as titles
```MD030 Spaces after list markers```
`MD030 Spaces after list markers`
- wrap text with indentation as they are exempt from the text-width
formatting rule
- wrap text with indentation as they are exempt from the text-width formatting
rule
```markdown
- wrap text with indentation as they are exempt from the text-width
formatting rule
- wrap text with indentation as they are exempt from the text-width formatting
rule
```
- may include sub-items in a similar fashion to titles by:
@@ -239,7 +235,7 @@ All lists should:
- include examples such as:
```markdown
````markdown
- may include sub-items in a similar fashion to titles by:
- indenting sub-items or examples by three spaces per level
@@ -249,24 +245,21 @@ All lists should:
- include examples such as:
```markdown
- may include sub-items in a similar fashion to titles by:
- indenting sub-items or examples by three spaces per level
```
```
````
### Inline Code
Inline code can be included using the single backtick (\`) method to
produce code-like references. An example of this would be to:
Inline code can be included using the single backtick (\`) method to produce
code-like references. An example of this would be to:
###### Example 6. Inline Code
```markdown
use the \`--help\` parameter on the command
```
Which would produce:
@@ -283,48 +276,50 @@ All code blocks must be:
- surround by blank lines to separate them from other text
```MD031 Fenced code blocks should be surrounded by blank lines```
`MD031 Fenced code blocks should be surrounded by blank lines`
- fenced with three backticks (\`\`\`) and not any other code block fencing characters.
- fenced with three backticks (\`\`\`) and not any other code block fencing
characters.
- have a language applied to them by entering the name after the three backticks.
- have a language applied to them by entering the name after the three
backticks.
```MD040 Fenced code blocks should have a language specified```
`MD040 Fenced code blocks should have a language specified`
- an exception to the above text formatting rules as they may contain
example lines that are required to be on a single line.
- an exception to the above text formatting rules as they may contain example
lines that are required to be on a single line.
Where possible, it is advised to try and make use of continuation lines
(\\) so that these are easily readable on any screen.
Where possible, it is advised to try and make use of continuation lines (\\) so
that these are easily readable on any screen.
###### Example 7. Code Block with Style
```markdown
````markdown
```markdown
This is a markdown example, <b> will display <b> not start a bold HTML style
Also ` will actually be displayed not interpreted
```
````
The style used on the fenced code block should match the contents of the
code block. In the above example, we used `markdown` as we were
displaying a markdown example. The following table is a basic example
what is most commonly used in the documentation:
The style used on the fenced code block should match the contents of the code
block. In the above example, we used `markdown` as we were displaying a markdown
example. The following table is a basic example what is most commonly used in
the documentation:
Type | Markdown Language | Usage
---: | :---: | ---
C++ | c++ | Formats code block as C++
PHP | php | Formats code block as PHP
SQL | sql | Formats code block as SQL
Script | bash | Formats code block as bash script
&nbsp; | sh | Formats code block as posix script
Shell | console | Formats code block as command line example
Markdown | markdown | Formats code block as Markdown
| Type | Markdown Language | Usage |
| -------: | :---------------: | ------------------------------------------ |
| C++ | c++ | Formats code block as C++ |
| PHP | php | Formats code block as PHP |
| SQL | sql | Formats code block as SQL |
| Script | bash | Formats code block as bash script |
| &nbsp; | sh | Formats code block as posix script |
| Shell | console | Formats code block as command line example |
| Markdown | markdown | Formats code block as Markdown |
### URLs
All URLs should be formatted in the markdown format and not just inserted
directly into the text. The format for this is:
directly into the text. The format for this is:
```markdown
[text for link](https://url/wanted)
@@ -336,8 +331,8 @@ This would produce: [text for link](https://url/wanted)
### Horizontal Rules
Horizontal rules should be made using three or more consecutive hyphens on
a single line. Again, these should be surrounded by spaces.
Horizontal rules should be made using three or more consecutive hyphens on a
single line. Again, these should be surrounded by spaces.
```markdown
Paragraph 1 text
@@ -360,24 +355,24 @@ bin/check_missing_link.sh
## Testing changes
To locally test the changes made to any Markdown document, you will need to
have ruby installed and then run:
To locally test the changes made to any Markdown document, you will need to have
ruby installed and then run:
```console
gem install mdl
```
If this pre-requisite has already been completed, then you can simply
type the following into your shell
If this pre-requisite has already been completed, then you can simply type the
following into your shell
```console
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 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.
```console
Documentation-Standards.md:221: MD031 Fenced code blocks should be surrounded by blank lines
@@ -396,4 +391,5 @@ Documentation-Standards.md:240: MD033 Inline HTML
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -184,4 +184,4 @@ function api_graph_item_save($graph_item_id, &$_fields_graph_item) {
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -101,4 +101,4 @@ include($config['base_path'] . '/lib/database.php');
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -293,4 +293,4 @@ git push -u
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+36 -35
View File
@@ -4,9 +4,9 @@ Special care must be taken for Cacti to properly support multiple DBMS's.
## Quotes
When writing queries do not use quotes around numeric values. While MySQL is
not strict about types, most DBMS's assume that any value contained within
quotes is a string.
When writing queries do not use quotes around numeric values. While MySQL is not
strict about types, most DBMS's assume that any value contained within quotes is
a string.
As well, single quotes are used unless a variable is referenced
@@ -26,9 +26,9 @@ DBMS's. Common examples of such functions are `MD5()`, `CONCAT()`, and `NOW()`.
## SQL Injection
Cacti provides support for prepared statements. You should use these prepared
Cacti provides support for prepared statements. You should use these prepared
statement functions as much as possible to avoid the risk of SQL Injection
attacks from the Cacti website. Examples include:
attacks from the Cacti website. Examples include:
```php
// Example prepared statements
@@ -52,11 +52,11 @@ db_execute(UPDATE host SET hostname = '$myhost' WHERE id = $id");
should be wrapped onto a continuation line for ease of use and readability.
The following keywords should also be placed at the start of a new line:
- joins statements (excluding JOIN itself which should not be used)
(eg, INNER JOIN, LEFT JOIN, RIGHT JOIN, OUTER JOIN, CROSS JOIN)
- joins statements (excluding JOIN itself which should not be used) (eg, INNER
JOIN, LEFT JOIN, RIGHT JOIN, OUTER JOIN, CROSS JOIN)
**Note:** *Any implicit join or JOIN without one of the modifiers should be
converted to an explicit join with a modifier. When converting the implicit
**Note:** \*Any implicit join or JOIN without one of the modifiers should be
converted to an explicit join with a modifier. When converting the implicit
join statement, remember to remove the WHERE joining clause.
- AND / OR
@@ -88,52 +88,53 @@ db_execute(UPDATE host SET hostname = '$myhost' WHERE id = $id");
### Example of single line SQL
###### Before formatting
#### Before formatting
```php
$templates = db_fetch_assoc('SELECT DISTINCT gt.id, gt.name FROM graph_templates AS gt INNER JOIN graph_templates_graph AS gtg ON gt.id = gtg.graph_template_id INNER JOIN graph_templates_item AS gti ON gtg.graph_template_id=gti.graph_template_id INNER JOIN data_template_rrd AS dtr ON gti.task_item_id=dtr.id INNER JOIN data_template_data AS dtd ON dtd.data_template_id=dtr.data_template_id AND dtd.local_data_id = 0 WHERE gtg.local_graph_id=0 AND dtr.local_data_id = 0 AND dtd.local_data_id = 0 AND dtd.data_input_id in (2,11,12) ORDER BY gt.name;'
```
###### Corrected formatting with prepared usage
#### Corrected formatting with prepared usage
```php
$templates = db_fetch_assoc_prepared('SELECT DISTINCT gt.id, gt.name
FROM graph_templates AS gt
INNER JOIN graph_templates_graph AS gtg
ON gt.id = gtg.graph_template_id
INNER JOIN graph_templates_item AS gti
ON gtg.graph_template_id=gti.graph_template_id
INNER JOIN data_template_rrd AS dtr
ON gti.task_item_id=dtr.id
INNER JOIN data_template_data AS dtd
ON dtd.data_template_id=dtr.data_template_id
AND dtd.local_data_id = 0
WHERE gtg.local_graph_id=0
AND dtr.local_data_id = 0
AND dtd.local_data_id = 0
AND dtd.data_input_id in (?,?,?)
ORDER BY gt.name',
array(2,11,12));
FROM graph_templates AS gt
INNER JOIN graph_templates_graph AS gtg
ON gt.id = gtg.graph_template_id
INNER JOIN graph_templates_item AS gti
ON gtg.graph_template_id=gti.graph_template_id
INNER JOIN data_template_rrd AS dtr
ON gti.task_item_id=dtr.id
INNER JOIN data_template_data AS dtd
ON dtd.data_template_id=dtr.data_template_id
AND dtd.local_data_id = 0
WHERE gtg.local_graph_id=0
AND dtr.local_data_id = 0
AND dtd.local_data_id = 0
AND dtd.data_input_id in (?,?,?)
ORDER BY gt.name',
array(2,11,12));
```
### Example of implicit join
###### Before formatting
#### Before formatting
```php
$user_realms = db_fetch_assoc('SELECT ua.id, uar.realm_id
FROM user_auth ua, user_auth_realms uar
WHERE ua.id = uar.user_id');
FROM user_auth ua, user_auth_realms uar
WHERE ua.id = uar.user_id');
```
###### Corrected formatting
#### Corrected formatting
```php
$user_realms = db_fetch_assoc('SELECT ua.id, uar.realm_id
FROM user_auth ua
INNER JOIN user_auth_realms uar
ON ua.id = uar.user_id');
FROM user_auth ua
INNER JOIN user_auth_realms uar
ON ua.id = uar.user_id');
```
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+1 -1
View File
@@ -87,4 +87,4 @@ for others to use and will more easily pass internal security and
pen tests.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+24 -16
View File
@@ -17,7 +17,7 @@ cacti from this page you can do the following
Some of the most important tools are listed below
### Rebuild poller cache
## Rebuild poller cache
The Poller Cache will be re-generated if you select this option. Use this
option only in the event of a database crash if you are experiencing issues
@@ -63,8 +63,9 @@ When you delete Data Sources from Cacti, the corresponding RRDfiles are not
removed automatically. Use this utility to facilitate the removal of
these old files.
In system utilities you can manually start the RRD cleaning procedure
You can either archive the selected RRD's to have them deleted in the next polling cycle
In system utilities you can manually start the RRD cleaning procedure
You can either archive the selected RRD's
to have them deleted in the next polling cycle
![System Utilities](images/system-utilities-rrdcleaner.png)
@@ -78,13 +79,16 @@ the RRDfile autoclean selection.
`Console > utilities > System Utilities > RRDfile Checker`
The RRDfile checker is a tool that scans all RRDfiles at a scheduled time and tests the stored data:
The RRDfile checker is a tool that scans all RRDfiles at a
scheduled time and tests the stored data:
- Stale values for 1 or 24 hours
- Whether the file is updated regularly
- Incorrect file read/write access
- Whether the Database Data Source objects match the RRDfiles Data Sources
For very large Cacti installs the **RRDfile checker** can take quite a long time to complete.
For very large Cacti installs the **RRDfile checker** can take quite
a long time to complete.
You can set number of concurrent parallel processes in `Console > Configuration > Settings > Data`
### Viewing Change log from system utilities
@@ -100,8 +104,9 @@ included in your version.
`Console > utilities > System Utilities > View user Log`
In system utilities you are able to view a log of user logins both successful and failures
The Log will also show what Client IP address the login originated from along with info
In system utilities you are able to view a log of user logins
both successful and failures The Log will also show what Client IP address
the login originated from along with info
if the login was based on password or token based login
![System Utilities](images/system-utilities-viewulog.png)
@@ -110,24 +115,25 @@ if the login was based on password or token based login
`Console > Utilities > System Utilities > View Boost Status`
In this view you can see statistics on how Boost is running you will be able to see
Information such as when the last time boost started, How long it ran for, The average boost record size
In this view you can see statistics on how Boost is running you will be able to see
Information such as when the last time boost started, How long it ran for,
The average boost record size
![System Utilities](images/system-utilities-boost1.png)
![System Utilities](images/system-utilities-boost2.png)
### Viewing the Data Source Query Cache
`Console > Utilities > System Utilities > View Data Source Query Cache`
The Data Query Cache stores information gathered from Data Query input types.
The values from these fields can be used in the text area of Graphs for Legends, Vertical Labels, and GPRINTS as well as in CDEF's.
The Data Query Cache stores information gathered from Data Query input types.
The values from these fields can be used in the text area of Graphs for Legends,
Vertical Labels, and GPRINTS as well as in CDEF's.
![System Utilities](images/system-utilities-viewdqcache.png)
### Viewing the Poller Cache
### Viewing the Poller Cache
`Console > Utilities > System Utilities > View Poller Cache`
@@ -137,11 +143,13 @@ This is the data that is being passed to the poller each time it runs.
### Viewing System log via System Utilities
You are able to view the system log via the System utilities page this will show the RAW log
this slightly differs from the view log tab as the device names will show the device ID rather than
You are able to view the system log via the System utilities
page this will show the RAW log
this slightly differs from the view log tab as the device names
will show the device ID rather than
the Device name this is the same view as you reading the log in the OS
![System Utilities](images/system-utilities-viewclog.png)
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+258 -254
View File
@@ -3,37 +3,40 @@
The real strength of Cacti is unleashed by using templates. There are five
different types of templates with the basic Cacti installation:
- **Device Templates** - Define a Collection of **Graph Templates** and
**Data Queries** that belong to a class of **Devices**
- **Graph Templates** - Define how to paint the Graph, it size, legend,
left and right Axis and it Canvas
- **Data Templates** - Define how data is to be stored in the RRDfile and
how often to collect that data
- **Aggregate Templates** - A special class of **Graph Template** that
allows you to combine elements from multiple **Graph** of a
common Template into one **Graph**
- **Color Templates** - A collection of color rotations to use for
**Aggregate Graphs**
- **Device Templates** - Define a Collection of **Graph Templates** and **Data
Queries** that belong to a class of **Devices**
While it is perfectly fine to define all **Data Sources** and **Graphs**
without using Templates at all, the burden of this approach is high.
- **Graph Templates** - Define how to paint the Graph, it size, legend, left and
right Axis and it Canvas
In most installations, there are hundreds if not thousands of **Devices**
of the same kind. And there are many similar **Graph Templates**, that span
multiple **Device Templates**. For example: Network Traffic information
is needed for almost every **Device**. Therefore, the parameters needed
to create a traffic RRDfile are defined by the **Data Template**,
in this case known as "Interface - Traffic". These
definitions are used by all Traffic-related RRDfiles.
- **Data Templates** - Define how data is to be stored in the RRDfile and how
often to collect that data
- **Aggregate Templates** - A special class of **Graph Template** that allows
you to combine elements from multiple **Graph** of a common Template into one
**Graph**
- **Color Templates** - A collection of color rotations to use for **Aggregate
Graphs**
While it is perfectly fine to define all **Data Sources** and **Graphs** without
using Templates at all, the burden of this approach is high.
In most installations, there are hundreds if not thousands of **Devices** of the
same kind. And there are many similar **Graph Templates**, that span multiple
**Device Templates**. For example: Network Traffic information is needed for
almost every **Device**. Therefore, the parameters needed to create a traffic
RRDfile are defined by the **Data Template**, in this case known as "Interface -
Traffic". These definitions are used by all Traffic-related RRDfiles.
The same approach is used for defining **Graph Templates**. This is done only
once. And all parameters defined within such a **Graph Template** are copied to
all **Graphs** that are created using this Template.
The last type of classic Templates are the **Device Templates**. The purpose
of **Device Templates** is to group all **Graph Templates** and
**Data Queries** for a given **Device Type**. Example **Device Types**
that you might find a **Device Template** for include:
The last type of classic Templates are the **Device Templates**. The purpose of
**Device Templates** is to group all **Graph Templates** and **Data Queries**
for a given **Device Type**. Example **Device Types** that you might find a
**Device Template** for include:
- Cisco Router
- Net-SNMP Device
@@ -42,31 +45,31 @@ that you might find a **Device Template** for include:
- Local Linux Device
- ...
So you will make up a **Device Template** e.g. for a specific type of
router, switch, host and the like. By assigning the correct **Device Template**
to each new **Device**, you'll never forget to create all needed **Graphs**.
So you will make up a **Device Template** e.g. for a specific type of router,
switch, host and the like. By assigning the correct **Device Template** to each
new **Device**, you'll never forget to create all needed **Graphs**.
There's no need to create all Templates on your own! Apart from the fact, that
many common templates are provided out-of-the-box, there's a very simple
mechanism to **Import Templates** and to **Export Templates** and more recently
to **Import Packages**.
More recent additions to the Cacti family of Templates are the **Aggregate Template**
and **Color Template**. The **Aggregate Template** allows you to define
a **Graph Template** that can aggregate data from many **Graphs** sharing
More recent additions to the Cacti family of Templates are the **Aggregate
Template** and **Color Template**. The **Aggregate Template** allows you to
define a **Graph Template** that can aggregate data from many **Graphs** sharing
that Template.
The **Color Template** defines a list of colors that are used in a Round Robin
fashion to change the colors seen on the resulting **Aggregate Graphs**
to better assist the user in interpreting the resulting **Graph**.
fashion to change the colors seen on the resulting **Aggregate Graphs** to
better assist the user in interpreting the resulting **Graph**.
In order to best follow the natural course of Template creation, the remainder
of this chapter will explain Templating starting with **Data Templates**,
then we will go from there to **Graph Templates**, and from there go to a
of this chapter will explain Templating starting with **Data Templates**, then
we will go from there to **Graph Templates**, and from there go to a
walk-through of creating both a **Data Template** and **Graph Template**.
From there, we will explain how to create a **Graph** using that newly created set
of Templates.
From there, we will explain how to create a **Graph** using that newly created
set of Templates.
## Data Templates
@@ -75,7 +78,7 @@ If you have many **Data Sources** that share most of their characteristics,
using a **Data Template** would probably make sense. No change of a **Data
Template** is propagated to already existing RRDfiles. But most of them may be
changed by using `rrdtool tune` from command line. Pay attention to not append
new *Data Source Items* to already existing RRDfiles. There's no `rrdtool`
new _Data Source Items_ to already existing RRDfiles. There's no `rrdtool`
command to achieve this!
### Creating a Data Template
@@ -88,37 +91,37 @@ The first thing you must do is give the template a name. This name has nothing
to do with the **Data Source** name, but is what you will use to identify the
template throughout Cacti.
Second, you will notice a list of **Data Source** / **Data Source Item**
field names with Use Per-Data Source Value check-boxes next to each one.
The nice thing about Templates in Cacti is that you can choose whether
to template each field on a per-field basis. If you leave the check-box
unchecked, every **Data Source** attached to the **Data Template**
will inherit its value from the Template. If the check-box is
checked, every **Data Source** attached to the **Data Template* will
contain its own value for that particular field. When generating a
real **Data Source**, you will be prompted to fill those non-templated
fields.
Second, you will notice a list of **Data Source** / **Data Source Item** field
names with Use Per-Data Source Value check-boxes next to each one. The nice
thing about Templates in Cacti is that you can choose whether to template each
field on a per-field basis. If you leave the check-box unchecked, every **Data
Source** attached to the **Data Template** will inherit its value from the
Template. If the check-box is checked, every **Data Source** attached to the
**Data Template** will contain its own value for that particular field. When
generating a real **Data Source**, you will be prompted to fill those
non-templated fields.
Not however that if you are using Cacti's **Automation** feature, there is
presently no way for you to override these values. So, plan accordingly
when engineering your Cacti deployment.
> **NOTE**: If you are using Cacti's **Automation** feature, there is presently
> no way for you to override these values. So, plan accordingly when engineering
> your Cacti deployment.
###### Table 13-1. Data Templates: Field Description of the Data Source Section
Name | Description
--- | ---
Name | The name of the **Data Source** that will be created by using this Template. You can use the keyword `host_description` enclosed by vertical bars in this field, which will be automatically substituted with the current host description of the **Device**. There are several replacement values available to you when using a Template.
Data Input Method | Here is where you tell Cacti how it is supposed to fetch data for this **Data Source**. There are several **Data Input Methods** that come with Cacti, and you can add your own by going to `Console > Data Collection > Data Input Methods`. If this RRDfile is being populated outside of Cacti, make sure to leave this field set to "None".
Data Source Profile | The **Data Source Profile** will define how often to collect data for the resulting **Data Source**, and how long to keep that data in the RRDfile.
Data Source Active | This is a quick and easy to tell Cacti to stop gathering data for this **Data Template**. The resulting **Data Source** can still be used on **Graphs**, but no data will be fed to it until it is made active again.
| Name | Description |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | The name of the **Data Source** that will be created by using this Template. You can use the keyword `host_description` enclosed by vertical bars in this field, which will be automatically substituted with the current host description of the **Device**. There are several replacement values available to you when using a Template. |
| Data Input Method | Here is where you tell Cacti how it is supposed to fetch data for this **Data Source**. There are several **Data Input Methods** that come with Cacti, and you can add your own by going to `Console > Data Collection > Data Input Methods`. If this RRDfile is being populated outside of Cacti, make sure to leave this field set to "None". |
| Data Source Profile | The **Data Source Profile** will define how often to collect data for the resulting **Data Source**, and how long to keep that data in the RRDfile. |
| Data Source Active | This is a quick and easy to tell Cacti to stop gathering data for this **Data Template**. The resulting **Data Source** can still be used on **Graphs**, but no data will be fed to it until it is made active again. |
> **NOTE:** For most **Data Templates**, you will should not have to to check
> the Use Per-Graph Value check-box for the name field. The Templating should handle
> this just fine. However, the Generic SNMP OID **Data Template** has this
> value checked to allow you to create Graphs and Data Sources on a piecemeal basis.
> the Use Per-Graph Value check-box for the name field. The Templating should
> handle this just fine. However, the Generic SNMP OID **Data Template** has
> this value checked to allow you to create Graphs and Data Sources on a
> piecemeal basis.
When you are finished filling in values for the **Data Template**, click Create and
you will be presented with a screen similar to the image below.
When you are finished filling in values for the **Data Template**, click Create
and you will be presented with a screen similar to the image below.
![Adding a Data Template](images/data-template.png)
@@ -126,164 +129,163 @@ you will be presented with a screen similar to the image below.
Just like a **Graph**, a **Data Source** can have more than one item. This is
useful in situations where a script returns more than piece of data at one time
and both need to appear on the same **Graph**. This also applies to **Data Queries**,
so you can have a single **Data Template** that contains both Inbound and
Outbound Traffic, rather than having to create a separate **Data Template** for each.
and both need to appear on the same **Graph**. This also applies to **Data
Queries**, so you can have a single **Data Template** that contains both Inbound
and Outbound Traffic, rather than having to create a separate **Data Template**
for each.
###### Table 13-2. Data Templates: Field Description of the Data Source Items Section
Name | Description
--- | ---
Internal Data Source Name | This is the name used by RRDtool to identify this particular data source within the RRDfile. RRDtool places a limit of 19 alphanumeric characters (plus '_' and '-') on this field.
Minimum Value | Here is where you specify the minimum value that is expected for this data source in the RRDfile. If a value lower than the minimum is given, it will be stored as Unknown (U).
Maximum Value | Here is where you specify the maximum value that is expected for this data source in the RRDfile. If a value higher than the maximum is given, it will be stored as Unknown (U). Note: It often makes sense to define a reasonable maximum value here to avoid spikes in case of a COUNTER wrap
Data Source Type | Cacti currently supports seven types of data that RRDtool can represent for any given data source: COUNTER: is for continuous incrementing counters like the ifInOctets counter in a router. The COUNTER data source assumes that the counter never decreases, except when a counter overflows. It is always a whole INTEGER, floating point numbers are invalid. The update function takes the overflow into account. The counter is stored as a per-second rate. When the counter overflows, RRDtool checks if the overflow happened at the 32-bit or 64-bit border and acts accordingly by adding an appropriate value to the result. GAUGE: numbers that are not continuously incrementing, e.g. a temperature reading. Floating point numbers are accepted. ABSOLUTE: counters that are reset upon reading. DERIVE: like COUNTER but without overflow checks
Heartbeat | As defined by RRDtool: "The maximum amount of time that can pass before data is entered as "unknown". This field is usually '600' or 2 data gathering intervals".
| Name | Description |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Internal Data Source Name | This is the name used by RRDtool to identify this particular data source within the RRDfile. RRDtool places a limit of 19 alphanumeric characters (plus '\_' and '-') on this field. |
| Minimum Value | Here is where you specify the minimum value that is expected for this data source in the RRDfile. If a value lower than the minimum is given, it will be stored as Unknown (U). |
| Maximum Value | Here is where you specify the maximum value that is expected for this data source in the RRDfile. If a value higher than the maximum is given, it will be stored as Unknown (U). Note: It often makes sense to define a reasonable maximum value here to avoid spikes in case of a COUNTER wrap |
| Data Source Type | Cacti currently supports seven types of data that RRDtool can represent for any given data source: COUNTER: is for continuous incrementing counters like the ifInOctets counter in a router. The COUNTER data source assumes that the counter never decreases, except when a counter overflows. It is always a whole INTEGER, floating point numbers are invalid. The update function takes the overflow into account. The counter is stored as a per-second rate. When the counter overflows, RRDtool checks if the overflow happened at the 32-bit or 64-bit border and acts accordingly by adding an appropriate value to the result. GAUGE: numbers that are not continuously incrementing, e.g. a temperature reading. Floating point numbers are accepted. ABSOLUTE: counters that are reset upon reading. DERIVE: like COUNTER but without overflow checks |
| Heartbeat | As defined by RRDtool: "The maximum amount of time that can pass before data is entered as "unknown". This field is usually '600' or 2 data gathering intervals". |
#### Custom Data
Assuming you selected a **Data Input Method** on the previous screen, you should
now be presented with a **Custom Data** form. It will show a single line for
every single parameter required for that very **Data Input Method**. This is
how the **Data Source** connects to the **Data Input Method**
to provide all run time parameters.
every single parameter required for that very **Data Input Method**. This is how
the **Data Source** connects to the **Data Input Method** to provide all run
time parameters.
Each **Custom Data** field is per-field Templatable as all of the other **Data Source**
fields are. Even if you select the Use Per-Data Source Value check-box, it might
be useful to specify a value that will be used as an "initial value" for any **Data
Source** using the **Data template**.
Each **Custom Data** field is per-field Templatable as all of the other **Data
Source** fields are. Even if you select the Use Per-Data Source Value check-box,
it might be useful to specify a value that will be used as an "initial value"
for any **Data Source** using the **Data template**.
### Applying Data Templates to Data Sources
> **NOTE:** When changing parameters of a **Data Template**, existing RRDfiles will
> not be changed automatically. If this is required, you will have to apply
> **NOTE:** When changing parameters of a **Data Template**, existing RRDfiles
> will not be changed automatically. If this is required, you will have to apply
> `rrdtool tune` command to any related RRDfile manually.
Applying a **Data Template** to a **Data Source** is a very simple process.
The first thing you must do is select the **Data Source** you want to apply
the template to under **Data Sources**. Under the **Data Template** Actions drop-down,
select the **Data Template** that you want to apply to the **Data Source**
and click Save. Though this should be very rare in modern Cacti instances,
it was fairly common before Cacti's Templating system matured.
Applying a **Data Template** to a **Data Source** is a very simple process. The
first thing you must do is select the **Data Source** you want to apply the
template to under **Data Sources**. Under the **Data Template** Actions
drop-down, select the **Data Template** that you want to apply to the **Data
Source** and click Save. Though this should be very rare in modern Cacti
instances, it was fairly common before Cacti's Templating system matured.
Once a Template is applied to a Data Source, you will notice that you can
only change values for the fields that you checked Use Per-Data Source Value
for.
Once a Template is applied to a Data Source, you will notice that you can only
change values for the fields that you checked Use Per-Data Source Value for.
> **NOTE:** Now any time a change is made to the **Data Template**, it will be
> automatically propagated to the **Data Sources** attached to it. However,
> as previously stated, changes to a **Data Template** that involve changes
> to the **Data Source Items**, will not be automatically applied to those same
> **Data Sources**.
> automatically propagated to the **Data Sources** attached to it. However, as
> previously stated, changes to a **Data Template** that involve changes to the
> **Data Source Items**, will not be automatically applied to those same **Data
> Sources**.
#### How To: Working with Templates
If you goto the following article
[How to Work with Templates](How-To-Work-With-Templates.md). There you will
find a step by step guide on how to work with variout Cacti Templates in general.
[How to Work with Templates](How-To-Work-With-Templates.md). There you will find
a step by step guide on how to work with variout Cacti Templates in general.
## Graph Templates
In Cacti, a **Graph Template** provides a skeleton for an actual **Graph**.
If you have many **Graphs** that share most of their characteristics,
using a **Graph Template** makes perfect sense. After a **Graph** is attached
to a particular **Graph Template**, all changes made to the **Graph Template**
will propagate out to all of its **Graphs**, unless Use Per-Graph Value has
been checked.
In Cacti, a **Graph Template** provides a skeleton for an actual **Graph**. If
you have many **Graphs** that share most of their characteristics, using a
**Graph Template** makes perfect sense. After a **Graph** is attached to a
particular **Graph Template**, all changes made to the **Graph Template** will
propagate out to all of its **Graphs**, unless Use Per-Graph Value has been
checked.
### Creating a Graph Template
To create a new **Graph Template**, select **Graph** unser `Console > Templates`
menu selection, then click Add normally the plus sign in the upper right
corner of the **Graph Template** interface.
menu selection, then click Add normally the plus sign in the upper right corner
of the **Graph Template** interface.
The first thing you must do is give the **Graph Template** a name. This
name has nothing to do with the graph title, but is what you will use to
identify the **Graph Template** throughout Cacti. Second, you will notice
a list of graph field names with Use Per-Graph Value check-boxes next to
each one. The nice thing about Templates in Cacti is that you can choose
whether to template each field on a per-field basis. If you leave the
check-box unchecked, every **Graph** owned by the **Graph Template**
will inherit its value from the Template. If the check-box is checked,
every **Graph** owned by **Graph Template** will have its own value
for that particular field.
The first thing you must do is give the **Graph Template** a name. This name has
nothing to do with the graph title, but is what you will use to identify the
**Graph Template** throughout Cacti. Second, you will notice a list of graph
field names with Use Per-Graph Value check-boxes next to each one. The nice
thing about Templates in Cacti is that you can choose whether to template each
field on a per-field basis. If you leave the check-box unchecked, every
**Graph** owned by the **Graph Template** will inherit its value from the
Template. If the check-box is checked, every **Graph** owned by **Graph
Template** will have its own value for that particular field.
###### Table 13-3. Field Description: Graph Templates
Name | Description
--- | ---
Title | The title of the **Graph** within Cacti and the title that will be printed on the actual **Graph** itself. **NOTE**: You can use the keyword `host_description` enclosed by vertical bars in this field, which will be automatically substituted with the current host description.
Image Format | Choose whether you would prefer to output your graph images in PNG or SVG.
Height | The height of the Graph Canvas in pixels. This is not the height of the overall Graph, just the Graph Canvas.
Width | The width of the Graph Canvas in pixels
Base Value | Should be set to 1024 for memory values and 1000 for traffic measurements.
Slope Mode | RRDtool graphs are composed of stair case curves by default. This is in line with the way RRDtool calculates its data. Some people favor a more "organic" look for their graphs.
Auto Scale | Enable auto scale for the graph. This option must be check to use the next two options. Upper/Lower limit values are ignored when using auto-scale since these boundaries are determined automatically.
Auto Scale Options | Choose whether you would like to use --alt-autoscale (ignoring given limits), --alt-autoscale-max (accepting a lower limit), --alt-autoscale-min (accepting an upper limit.
Logarithmic Scaling | Choose if you want logarithmic y-axis scaling.
Scientific Units for Logarithmic Scaling | For linear graphs, scientific units (in magnitudes of k=kilo, M=mega, ...) is default. But for logarithmic graphs, exponential notation is default. Choose if you want logarithmic y-axis scaling and scientific units.
Rigid Boundaries Mode | From the RRDtool manual "Normally rrdgraph will automatically expand the lower and upper limit if the graph contains a value outside the valid range. With this option you can disable this behavior".
Auto Padding | If you have ever created RRDtool based graphs manually, you may have realized how annoying it can be to get text to line up properly. With this option Cacti will do its best to make the columns on your graph legend line up. This option works best when your graph legend has a consistent number of columns.
Allow Graph Export | If you choose to use Cacti's static HTML/image export, you can choose whether you want each individual graph to be exported.
Upper Limit | The maximum value that will be displayed on the y-axis. This value is ignored is auto-scaling is turned on.
Lower Limit | The minimum value that will be displayed on the y-axis. This value is ignored is auto-scaling is turned on.
Base Value | Whether you want to base the y-axis labels on 1000 or 1024. This field will typically be set to 1024 for memory and 1000 for traffic measurements.
Unit Grid Value | Sets the unit value for the y-axis (--y-grid). You should probably keep the unit short as to keep it readable.
Unit Exponent Value | Sets the 10^e scaling of the y-axis. Valid values for this field are between -18 and 18. For example, you could use 3 to display everything in 'k' (kilo) or -6 to display everything in 'u' (micro).
Vertical Label | The text to print on the left edge of the graph. Usually is the units the data on the graph is measured in.
| Name | Description |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title | The title of the **Graph** within Cacti and the title that will be printed on the actual **Graph** itself. **NOTE**: You can use the keyword `host_description` enclosed by vertical bars in this field, which will be automatically substituted with the current host description. |
| Image Format | Choose whether you would prefer to output your graph images in PNG or SVG. |
| Height | The height of the Graph Canvas in pixels. This is not the height of the overall Graph, just the Graph Canvas. |
| Width | The width of the Graph Canvas in pixels |
| Base Value | Should be set to 1024 for memory values and 1000 for traffic measurements. |
| Slope Mode | RRDtool graphs are composed of stair case curves by default. This is in line with the way RRDtool calculates its data. Some people favor a more "organic" look for their graphs. |
| Auto Scale | Enable auto scale for the graph. This option must be check to use the next two options. Upper/Lower limit values are ignored when using auto-scale since these boundaries are determined automatically. |
| Auto Scale Options | Choose whether you would like to use --alt-autoscale (ignoring given limits), --alt-autoscale-max (accepting a lower limit), --alt-autoscale-min (accepting an upper limit. |
| Logarithmic Scaling | Choose if you want logarithmic y-axis scaling. |
| Scientific Units for Logarithmic Scaling | For linear graphs, scientific units (in magnitudes of k=kilo, M=mega, ...) is default. But for logarithmic graphs, exponential notation is default. Choose if you want logarithmic y-axis scaling and scientific units. |
| Rigid Boundaries Mode | From the RRDtool manual "Normally rrdgraph will automatically expand the lower and upper limit if the graph contains a value outside the valid range. With this option you can disable this behavior". |
| Auto Padding | If you have ever created RRDtool based graphs manually, you may have realized how annoying it can be to get text to line up properly. With this option Cacti will do its best to make the columns on your graph legend line up. This option works best when your graph legend has a consistent number of columns. |
| Allow Graph Export | If you choose to use Cacti's static HTML/image export, you can choose whether you want each individual graph to be exported. |
| Upper Limit | The maximum value that will be displayed on the y-axis. This value is ignored is auto-scaling is turned on. |
| Lower Limit | The minimum value that will be displayed on the y-axis. This value is ignored is auto-scaling is turned on. |
| Base Value | Whether you want to base the y-axis labels on 1000 or 1024. This field will typically be set to 1024 for memory and 1000 for traffic measurements. |
| Unit Grid Value | Sets the unit value for the y-axis (--y-grid). You should probably keep the unit short as to keep it readable. |
| Unit Exponent Value | Sets the 10^e scaling of the y-axis. Valid values for this field are between -18 and 18. For example, you could use 3 to display everything in 'k' (kilo) or -6 to display everything in 'u' (micro). |
| Vertical Label | The text to print on the left edge of the graph. Usually is the units the data on the graph is measured in. |
### Auto-scaling Options Explained
Relative to Auto-scale Options, the RRDtool graph manual says:
- Limits [-u|--upper-limit value] [-l|--lower-limit value] [-r|--rigid]
By default the graph will be auto-scaling so that it will adjust the y-axis
to the range of the data. You can change this behavior by explicitly
setting the limits. The displayed y-axis will then range at least from
lower-limit to upper-limit. Auto-scaling will still permit those boundaries
to be stretched unless the rigid option is set.
- [-A|--alt-autoscale] Sometimes the default algorithm for selecting the
y-axis scale is not satisfactory. Normally the scale is selected from a
predefined set of ranges and this fails miserably when you need to graph
something like "260 + 0.001 * sin(x)". This option calculates the minimum
and maximum y-axis from the actual minimum and maximum data values.
Our example would display slightly less than "260-0.001" to slightly more
than "260+0.001".
- [-J|--alt-autoscale-min] Where "--alt-autoscale" will modify both the
absolute maximum AND minimum values, this option will only affect the
minimum value. The maximum value, if not defined on the command line,
will be 0. This option can be useful when graphing router traffic when
the WAN line uses compression, and thus the throughput may be higher than
the WAN line speed.
- [-M|--alt-autoscale-max] Where "--alt-autoscale"
will modify both the absolute maximum AND minimum values, this option
will only affect the maximum value. The minimum value, if not defined on
the command line, will be 0. This option can be useful when graphing
router traffic when the WAN line uses compression, and thus the
throughput may be higher than the WAN line speed.
- Limits [-u|--upper-limit value] [-l|--lower-limit value] [-r|--rigid] By
default the graph will be auto-scaling so that it will adjust the y-axis to
the range of the data. You can change this behavior by explicitly setting the
limits. The displayed y-axis will then range at least from lower-limit to
upper-limit. Auto-scaling will still permit those boundaries to be stretched
unless the rigid option is set.
When you are finished filling in values for the **Graph Template**, click
Create and you will be presented with a page similar to the image below.
The example below is from a completed Traffic Graph Template.
- [-A|--alt-autoscale] Sometimes the default algorithm for selecting the y-axis
scale is not satisfactory. Normally the scale is selected from a predefined
set of ranges and this fails miserably when you need to graph something like
"260 + 0.001 \* sin(x)". This option calculates the minimum and maximum y-axis
from the actual minimum and maximum data values. Our example would display
slightly less than "260-0.001" to slightly more than "260+0.001".
In this first image, you can see what elements will be painted on the
**Graph** Canvas. They are represented by **LINEX**, **AREA**
and **STACK** elements. The **Graph Items** listed as **GPRINT** and
**COMMENT** appear in the Legend Area of the **Graph**.
- [-J|--alt-autoscale-min] Where "--alt-autoscale" will modify both the absolute
maximum AND minimum values, this option will only affect the minimum value.
The maximum value, if not defined on the command line, will be 0. This option
can be useful when graphing router traffic when the WAN line uses compression,
and thus the throughput may be higher than the WAN line speed.
The **Graph Input Items** are the Cacti names for the Data Sources that
appear on the **Graph** as well as other items that can be substituted
during **Graph** Creation.
- [-M|--alt-autoscale-max] Where "--alt-autoscale" will modify both the absolute
maximum AND minimum values, this option will only affect the maximum value.
The minimum value, if not defined on the command line, will be 0. This option
can be useful when graphing router traffic when the WAN line uses compression,
and thus the throughput may be higher than the WAN line speed.
The `Multiple Instances` field is a parameter to let Cacti know that it
should allow you to create more than one **Graph** per **Device** using the
**Graph Template**.
When you are finished filling in values for the **Graph Template**, click Create
and you will be presented with a page similar to the image below. The example
below is from a completed Traffic Graph Template.
In this first image, you can see what elements will be painted on the **Graph**
Canvas. They are represented by **LINEX**, **AREA** and **STACK** elements. The
**Graph Items** listed as **GPRINT** and **COMMENT** appear in the Legend Area
of the **Graph**.
The **Graph Input Items** are the Cacti names for the Data Sources that appear
on the **Graph** as well as other items that can be substituted during **Graph**
Creation.
The `Multiple Instances` field is a parameter to let Cacti know that it should
allow you to create more than one **Graph** per **Device** using the **Graph
Template**.
![Adding a Graph Template](images/graph-template.png)
The **Common Options** are options that most every **Graph Template** included.
The **Scaling Options** are also very common, but related to **Graph**
scaling only.
The **Scaling Options** are also very common, but related to **Graph** scaling
only.
![Adding a Graph Template Options](images/graph-template-options1.png)
@@ -294,37 +296,37 @@ common but are available in Cacti should you choose to use them.
#### Graph Items
The first thing you should do is create **Graph Items** for a **Graph Template**,
just like for a stand alone **Graph**. One difference you will notice is that
the **Data Sources** drop-down will contain a list of **Data Template**
items rather than **Data Source Items**. It is important that Cacti can make
this association here, so that Cacti doesn't have to make unnecessary
The first thing you should do is create **Graph Items** for a **Graph
Template**, just like for a stand alone **Graph**. One difference you will
notice is that the **Data Sources** drop-down will contain a list of **Data
Template** items rather than **Data Source Items**. It is important that Cacti
can make this association here, so that Cacti doesn't have to make unnecessary
assumptions later.
###### Table 13-4. Field Description: Graph Template Items
Name | Description
--- | ---
Data Source | If this graph item is to represent some sort of data, you must select a your data source here. Keep in mind that not all graph items have a data source. Graph item types such as COMMENT, VRULE, and HRULE typically do not.
Color | Depending on the graph item type, you can select a color for the graph item. This field only applies to the graph item types AREA, STACK, LINE1, LINE2, and LINE3.
Opacity/Alpha Channel | For a colored graph item, you may optionally select an opacity (alpha channel). This option is not available with RRDtool-1.0.x.
Graph Item Type | This field is important because it defines what kind of graph item this is. Types such as AREA, STACK, LINE1, LINE2, and LINE3 are used to represent data on the graph, while COMMENT and GPRINT are used put on the legend. The LEGEND type is specific to Cacti only and can be used if you want to Cacti to automatically create a GPRINT-LAST/GPRINT-AVERAGE/GPRINT-MAXIMUM graph item for you. Note: You must always put an AREA item before using STACK or your graph will not render.
Consolidation Function | This tells RRDtool which consolidation function to use when representing this data on the graph. You will typically use AVERAGE for most things on the graph area, and LAST/MAXIMUM as well for GPRINT items.
CDEF Function | If you want to apply a CDEF function to the graph item, select one here. Check out the CDEF section of the manual for more information.
Value | This field is only used with the HRULE/VRULE graph item types. Type any valid integer to draw the line at for HRULE or the time of the day HH:MM for VRULE.
GPRINT Type | If this item is a GPRINT, you can choose how you want the number to be formatted. You can add your own in the GPRINT Presets section of Cacti.
Text Format | You can enter text to be displayed on the legend here. This field is applicable for all graph item types except for the virtual LEGEND type.
Hard Return | Check this box to force graph items onto the next line.
| Name | Description |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Data Source | If this graph item is to represent some sort of data, you must select a your data source here. Keep in mind that not all graph items have a data source. Graph item types such as COMMENT, VRULE, and HRULE typically do not. |
| Color | Depending on the graph item type, you can select a color for the graph item. This field only applies to the graph item types AREA, STACK, LINE1, LINE2, and LINE3. |
| Opacity/Alpha Channel | For a colored graph item, you may optionally select an opacity (alpha channel). This option is not available with RRDtool-1.0.x. |
| Graph Item Type | This field is important because it defines what kind of graph item this is. Types such as AREA, STACK, LINE1, LINE2, and LINE3 are used to represent data on the graph, while COMMENT and GPRINT are used put on the legend. The LEGEND type is specific to Cacti only and can be used if you want to Cacti to automatically create a GPRINT-LAST/GPRINT-AVERAGE/GPRINT-MAXIMUM graph item for you. Note: You must always put an AREA item before using STACK or your graph will not render. |
| Consolidation Function | This tells RRDtool which consolidation function to use when representing this data on the graph. You will typically use AVERAGE for most things on the graph area, and LAST/MAXIMUM as well for GPRINT items. |
| CDEF Function | If you want to apply a CDEF function to the graph item, select one here. Check out the CDEF section of the manual for more information. |
| Value | This field is only used with the HRULE/VRULE graph item types. Type any valid integer to draw the line at for HRULE or the time of the day HH:MM for VRULE. |
| GPRINT Type | If this item is a GPRINT, you can choose how you want the number to be formatted. You can add your own in the GPRINT Presets section of Cacti. |
| Text Format | You can enter text to be displayed on the legend here. This field is applicable for all graph item types except for the virtual LEGEND type. |
| Hard Return | Check this box to force graph items onto the next line. |
#### Graph Item Inputs
After creating **Graph Items** for your **Graph Template**, you will need to create
some **Graph Item Inputs**. **Graph Item Inputs** are unique to **Graph Templates**
because of the large number of items they sometimes contain. **Graph Item Inputs**
enable you to take one **Graph Item** field, and associate it with multiple
**Graph Items**. **Graph Item Input** fields are generally created automatically
as you add **Graph Items** associated with a **Data Source**, like a LINE
or AREA or GPRINT.
After creating **Graph Items** for your **Graph Template**, you will need to
create some **Graph Item Inputs**. **Graph Item Inputs** are unique to **Graph
Templates** because of the large number of items they sometimes contain. **Graph
Item Inputs** enable you to take one **Graph Item** field, and associate it with
multiple **Graph Items**. **Graph Item Input** fields are generally created
automatically as you add **Graph Items** associated with a **Data Source**, like
a LINE or AREA or GPRINT.
To create a new **Graph Item Input** manually, click Add on the right of the
**Graph Item Inputs** form. There are various fields that must be filled in for
@@ -332,57 +334,57 @@ every graph item input:
###### Table 13-5. Field Description: Graph Template Items
Name | Description
--- | ---
Name | This will be the name used to identify the **Graph Item Input** on both the **Graph Template** and **Graph** edit pages.
Description | (Optional) This description will be displayed on the **Graph** edit page of any **Graph** using this **Graph Template** if specified.
Field Type | You must choose the field that you are going to associate with one or more **Graph Item**.
Associated Graph Items | Choose one or more **Graph Items** to associate with the field selected for "Field Type". When the user specifies a value for the field, it will be applied to all of the items you select here.
| Name | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | This will be the name used to identify the **Graph Item Input** on both the **Graph Template** and **Graph** edit pages. |
| Description | (Optional) This description will be displayed on the **Graph** edit page of any **Graph** using this **Graph Template** if specified. |
| Field Type | You must choose the field that you are going to associate with one or more **Graph Item**. |
| Associated Graph Items | Choose one or more **Graph Items** to associate with the field selected for "Field Type". When the user specifies a value for the field, it will be applied to all of the items you select here. |
### Applying Graph Templates to Graphs
Applying a **Graph Template** to an existing **Graph** is a very simple process,
though very uncommon in a modern Cacti install. The first thing you must do
is select the **Graph** you want to apply the template to under **Graph Management**.
Under the **Graph Template** Action drop-down, select the **Graph Template**
that you want to apply to the **Graph** and click Save. If this is a new **Graph**
or the **Graph** and **Graph Template** contain an equal number of **Graph Items**,
the **Graph Template" will be automatically applied. If number of **Graph Items**
varies from the **Graph** to the target **Graph Template**, you will be prompted
with a warning that your **Graph** will be changed, and not always for the better.
though very uncommon in a modern Cacti install. The first thing you must do is
select the **Graph** you want to apply the template to under **Graph
Management**. Under the **Graph Template** Action drop-down, select the **Graph
Template** that you want to apply to the **Graph** and click Save. If this is a
new **Graph** or the **Graph** and **Graph Template** contain an equal number of
**Graph Items**, the **Graph Template** will be automatically applied. If number
of **Graph Items** varies from the **Graph** to the target **Graph Template**,
you will be prompted with a warning that your **Graph** will be changed, and not
always for the better.
Once the **Graph Template** is applied to the existing **Graph**, you will notice
that you can only change values for the fields that you checked Use Per-Graph
Value for. You will also notice a new box, called **Graph Item Inputs**.
This is where you can specify values for the **Graph Item Inputs** that you
defined in the **Graph Template**. The values specified here will be applied to
each **Graph Item** tied to the **Graph Item Input**.
Once the **Graph Template** is applied to the existing **Graph**, you will
notice that you can only change values for the fields that you checked Use
Per-Graph Value for. You will also notice a new box, called **Graph Item
Inputs**. This is where you can specify values for the **Graph Item Inputs**
that you defined in the **Graph Template**. The values specified here will be
applied to each **Graph Item** tied to the **Graph Item Input**.
> **NOTE:** Any time a change is made to the **Graph Template**, it will be
> automatically propagated to the **Graphs** associated to it.
## Device Templates
**Device Templates** in Cacti, often times referred to as Host Templates
serve as a way to group a set of common **Graph Templates** and **Data Queries**
to **Devices** of a certain class, say a Cisco Router or Linux host using
Net-SNMP. It really accelerates the deployment of a Cacti system across
and enterprise of Devices.
**Device Templates** in Cacti, often times referred to as Host Templates serve
as a way to group a set of common **Graph Templates** and **Data Queries** to
**Devices** of a certain class, say a Cisco Router or Linux host using Net-SNMP.
It really accelerates the deployment of a Cacti system across and enterprise of
Devices.
### Adding a Device Template
To create a new **Device Template** in Cacti, select the **Device* option under
To create a new **Device Template** in Cacti, select the **Device** option under
the `Console > Templates` menu selection. Once on that page, click Add on the
right. Type a unique name for the **Device Template* and click the Create
right. Type a unique name for the **Device Template** and click the Create
button. You will be redirected back to the edit page with the
`Associated Graph Templates` and `Associated Data Queries` forms empty.
These two forms allow you to associate **Graph Templates** and/or
**Data Queries** with the **Device Template**. Simply select something
from the drop-down menu and click Add to associate it with your
**Device Template**.
`Associated Graph Templates` and `Associated Data Queries` forms empty. These
two forms allow you to associate **Graph Templates** and/or **Data Queries**
with the **Device Template**. Simply select something from the drop-down menu
and click Add to associate it with your **Device Template**.
In the case below, we show the Net-SNMP **Device Template**. Note the variety
of Graph Templates and Data Queries available for this Class of **Devices**.
In the case below, we show the Net-SNMP **Device Template**. Note the variety of
Graph Templates and Data Queries available for this Class of **Devices**.
![Adding a Host Template](images/device-template.png)
@@ -390,44 +392,45 @@ of Graph Templates and Data Queries available for this Class of **Devices**.
Assume, you're searching for a specific set of templates to monitor a special
type of device. Apart from designing templates from scratch, there's a good
chance to find a solution in the [Scripts and Templates
Forum](http://forums.cacti.net/forum-12.html). The set of templates is usually
provided as a single XML file holding all required definitions for a data
template and a graph template. Depending on the goal of the original author,
he/she may have provided a **Device Template** as well as part of this XML file.
Note that after you **Import Templates**, you may also have to copy a Resource
XML file to the appropriate &lt;path_cacti&gt;/resource directory, and a script
to the &lt;path_cacti&gt;/scripts directory. However, also note that in the
current version of Cacti, **Packages** are now importable as well. When you
import a **Package** all of the required additional file changes will also be
accommodated. We will discuss **Packages** later in the documentation.
chance to find a solution in the
[Scripts and Templates Forum](http://forums.cacti.net/forum-12.html). The set of
templates is usually provided as a single XML file holding all required
definitions for a data template and a graph template. Depending on the goal of
the original author, he/she may have provided a **Device Template** as well as
part of this XML file. Note that after you **Import Templates**, you may also
have to copy a Resource XML file to the appropriate &lt;path_cacti&gt;/resource
directory, and a script to the &lt;path_cacti&gt;/scripts directory. However,
also note that in the current version of Cacti, **Packages** are now importable
as well. When you import a **Package** all of the required additional file
changes will also be accommodated. We will discuss **Packages** later in the
documentation.
![Import Templates](images/import-template.png)
If the XML file was downloaded, simply select that file from the Downloads
location on your local system. Cacti no longer supports pasting the XML into
the browser window.
location on your local system. Cacti no longer supports pasting the XML into the
browser window.
Please pay attention the the `Data Source Profile` field. By default, cacti will
attempt to use your default **Data Source Profile**. However, you can change
attempt to use your default **Data Source Profile**. However, you can change
that at import time to use an alternate **Data Source Profile** or even the one
from the **Template** itself, if it includes one.
Also, not that if you have made local modification to an earlier version of a
**Graph Template**, and wish to fully migrate to the new **Graph Template** for
all your existing **Graphs**, please select `Remove Orphaned Graph Items`.
Otherwise, your **Graphs** will look awkward in the end. This should not be a
Otherwise, your **Graphs** will look awkward in the end. This should not be a
problem for new Imports.
It's also important to `Preview` the **Template** imports to access the impact
that the import will have on existing database object. In earlier versions of
Cacti, you were unable to determine what would actually change. However, in the
that the import will have on existing database object. In earlier versions of
Cacti, you were unable to determine what would actually change. However, in the
current and future versions of Cacti, you will be able to see all local
modifications when performing a `Preview` prior to `Importing`.
In the image below, you can see the output of a `Preview` of the Cisco WLC 5520
**Device Template**. When Previewing, no changes are actually made ot your
Cacti system.
**Device Template**. When Previewing, no changes are actually made ot your Cacti
system.
![Import Template Preview](images/import-template-preview.png)
@@ -440,8 +443,8 @@ appropriate directory under the `./resource` directory.
When importing templates, Cacti will perform a version check. All XML templates
hold the version of the Cacti system that generated this XML set. Cacti will
import only, if your current Cacti version equals or is higher than the
exported one.
import only, if your current Cacti version equals or is higher than the exported
one.
## Export Templates
@@ -457,4 +460,5 @@ Template** or a **Data Query**. When selecting `Include Dependencies`, e.g. a
browser or to a file for uploading.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+7 -7
View File
@@ -4,7 +4,7 @@ This section will describe **Tree Rules** in Cacti.
Tree rules allow Automation to bunch up devices based on matches
on rules we come up with you can say bunch all Cisco devices on to a Cisco tree.
Or if you have a site where all of the hostnames start with siteb you can
Or if you have a site where all of the hostnames start with siteb you can
have a site b tree etc see below for some examples.
To get started you will need to create a Tree rule on the top right click the +
@@ -16,7 +16,7 @@ to start a new rule you are also able to duplicate rules to make it easier as we
![Tree Rules Item Edit](images/automation-tree-rules-edit2.png)
We need a way to tell automation what device we are looking for
We need a way to tell automation what device we are looking for
in the example above we are looking for a device with the hostname Linux
this is done via a REGEX any perl based REGEX can be used.
@@ -31,12 +31,12 @@ from the dropdown list.
![Tree Rules Item Edit](images/automation-tree-rules-edit3.png)
We also have the option to auto create a tree based on our rule in this case a new tree
Named Linux will be created if it does not already exist.
We also have the option to auto create a tree based on our rule in this case
a new tree Named Linux will be created if it does not already exist.
### Video Walkthrough
## Video Walkthrough
[![Video Tutorial ](http://img.youtube.com/vi/yxO-CgaeFNc/0.jpg)](https://youtu.be/yxO-CgaeFNc "Video Tutorial")
[![Video Tutorial](http://img.youtube.com/vi/yxO-CgaeFNc/0.jpg)](https://youtu.be/yxO-CgaeFNc "Video Tutorial")
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
+10 -6
View File
@@ -36,15 +36,19 @@ of how Tree Sorting is accomplished.
![Tree Sorting](images/tree-options-sorting.png)
###### Table 8-1. Tree Sporting Type Definitions
### Table 8-1. Tree Sporting Type Definitions
Field | Value | Description
--- | --- | ---
Name | Name of the tree entry. | The sort order of all trees themselves is always alphabetical
Sorting Type | Manual Ordering (No Sorting) | You may chance the sequence at your will
Alphabetical Ordering | 1, Ab, ab | All sub-trees are ordered alphabetically, unless specifies otherwise (you may chance sort options at sub-tree label)
Name | Name of the tree entry. | The sort order of all trees themselves is
always alphabetical
Sorting Type | Manual Ordering (No Sorting) | Y
ou may chance the sequence at your will
Alphabetical Ordering | 1, Ab, ab | All sub-trees are ordered alphabetically,
unless specifies otherwise (you may chance sort options at sub-tree label)
Natural Ordering | ab1, ab2, ab7, ab10, ab20 | N/A
Numeric Ordering | 01, 02, 4, 04 | Leading zeroes are not taken into account when ordering numerically
Numeric Ordering | 01, 02, 4, 04 | Leading zeroes are not taken into account
when ordering numerically
End users will not be able to view the **Tree** or it's Graphs until you
publish it. To edit a **Tree**, you will be required to lock it for your use.
@@ -65,4 +69,4 @@ at one time.
Don't forget to unlock your **Tree** before finishing your editing session.
---
<copy>Copyright (c) 2004-2023 The Cacti Group</copy>
Copyright (c) 2004-2023 The Cacti Group
Loaded 100 of 114 files, more files were not shown because too many files have changed in this diff. Show more