Thold 2.x - Thresholding/Alerting module for cacti 8.6

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Locked
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

well.. thats nice.. i have 1.. but i dont know it wont create through gui

nor does it really works.. i set some threshold today and you can clearly see it reached and it didnt notified me :(

does anyone have a cacti install (latest) w/ latest thold ??
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Post by chadd »

alexus wrote:well.. thats nice.. i have 1.. but i dont know it wont create through gui

nor does it really works.. i set some threshold today and you can clearly see it reached and it didnt notified me :(

does anyone have a cacti install (latest) w/ latest thold ??
I am using the latest cacti and thold and it works now. I had to go back through the forum and found a post by Pumpi, post #155. I followed those instructions as well as installed all the latest patches for cacti. Tholds finally work!!
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

can you tar it and send it over my way? and/or provide that post #155
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
wingfox
Posts: 11
Joined: Tue Jun 21, 2005 3:06 am
Location: Mallorca (Balearic Islands) SPAIN

Post by wingfox »

I've downloaded Thold 2.1a, I've installed it, and ... now when I go to the Graphs, I can't see anyone!!!!

I just unzipped the file, and executed the install.sh giving the correct path to cacti, in my case "/usr/share/cacti".Have I done something wrong???

I uninstalled it, and things work ok again, but when I installed it again it doesn't work.

Can somebody help me??? Where can I find the latest Thold version or a compatible version with Cacti 0.8.6c????
<__Wingfox__>
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

You can try the file attached.

As stated in my previous post, it is not an official Thold release.
Some files have been modified (see README for the fixes). You should backup your cacti directory before proceeding with the installation.

It seems to work on my Cacti installation (Debian Sarge / Cacti 0.8.6c debian package), but I haven't had time for sufficient testing.
It should work on Cacti 0.8.6d as well.
Not tested on other cacti version (it will most likely broke template importation from version > 0.8.6d)
Attachments
thold.2.1b.tar.gz
(58.29 KiB) Downloaded 502 times
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

didn't work for me either...

once i hit auto generate thersholds for my device i get

Update failed:
INSERT INTO thold (element, rra) VALUES (, 57)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 57)' at line 1

neither none of my threshold alerts are working... :(

thold is very nice addon, but i cant get it to work..:(

i'm using latest cacti 0.8.6f and i've tryed thold 2.1b

btw.. is it only me or is install.sh is broken?

like this

alexus@d:/home/alexus/thold-2.1b> ./install.sh
if: Expression Syntax.
alexus@d:/home/alexus/thold-2.1b>

i actually have to work around and end up doing some manual installation to get it to work...
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

install.sh needs to be given the path to cacti directory. You can also provide the user / pass for cacti database, but it never worked for me (I have to do a mysql cacti < thold.sql as specified by the script)

try

Code: Select all

./install.sh /usr/share/cacti/site
mysql cacti < thold.sql
replace "/usr/share/cacti/site" by the actual path to your cacti directory.

btw, I don't know if the file I provided can work on cacti > 0.8.6d.
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

welll... here look..

alexus@d:/tmp/thold> ./install.sh ../cacti-0.8.6f/
if: Expression Syntax.
alexus@d:/tmp/thold>

just like that... now if i use sh ./install i get different


alexus@d:/tmp/thold> sh ./install.sh ../cacti-0.8.6f/
Directory Check OK
Installing into ../cacti-0.8.6f/
This is a new install..
[: unexpected operator <-- what's that?
database username and pass given
**************************************************************
WARNING: - Database login still failed -
You will have to import manually using 'mysql cacti < thold.sql
**************************************************************

WARNING: you may want to backup files & cacti database before proceeding.
An uninstall script is provided to remove & restore modified files.
Use at your own risk. NO Warranty or Guarantee given.
If you continue, you agree not to hold me liable for damages or loss of data.
press CTRL+C in the next 5 seconds to stop

Backing up files...
mysqldump: Got error: 1045: Access denied for user 'cactiuser'@'localhost' (using password: YES) when trying to connect
Adding SQL tables...
mysql Ver 14.7 Distrib 4.1.13, for unknown-freebsd5.4 (i386) using EditLine wrapper
Copyright (C) 2002 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion, but startup
and reconnecting may take a longer time. Disable with
--disable-auto-rehash.
-A, --no-auto-rehash
No automatic rehashing. One has to use 'rehash' to get
table and field completion. This gives a quicker start of
mysql and disables rehashing on reconnect. WARNING:
options deprecated; use --disable-auto-rehash instead.
-B, --batch Don't use history file. Disable interactive behavior.
(Enables --silent)
--character-sets-dir=name
Directory where character sets are.
--default-character-set=name
Set the default character set.
-C, --compress Use compression in server/client protocol.
-#, --debug[=#] This is a non-debug version. Catch this and exit
-D, --database=name Database to use.
--delimiter=name Delimiter to be used.
-e, --execute=name Execute command and quit. (Disables --force and history
file)
-E, --vertical Print the output of a query (rows) vertically.
-f, --force Continue even if we get an sql error.
-g, --no-named-commands
Named commands are disabled. Use \* form only, or use
named commands only in the beginning of a line ending
with a semicolon (;) Since version 10.9 the client now
starts with this option ENABLED by default! Disable with
'-G'. Long format commands still work from the first
line. WARNING: option deprecated; use
--disable-named-commands instead.
-G, --named-commands
Enable named commands. Named commands mean this program's
internal commands; see mysql> help . When enabled, the
named commands can be used from any line of the query,
otherwise only from the first line, before an enter.
Disable with --disable-named-commands. This option is
disabled by default.
-i, --ignore-spaces Ignore space after function names.
--local-infile Enable/disable LOAD DATA LOCAL INFILE.
-b, --no-beep Turn off beep on error.
-h, --host=name Connect to host.
-H, --html Produce HTML output.
-X, --xml Produce XML output
--line-numbers Write line numbers for errors.
-L, --skip-line-numbers
Don't write line number for errors. WARNING: -L is
deprecated, use long version of this option instead.
--no-pager Disable pager and print to stdout. See interactive help
(\h) also. WARNING: option deprecated; use
--disable-pager instead.
--no-tee Disable outfile. See interactive help (\h) also. WARNING:
option deprecated; use --disable-tee instead
-n, --unbuffered Flush buffer after each query.
--column-names Write column names in results.
-N, --skip-column-names
Don't write column names in results. WARNING: -N is
deprecated, use long version of this options instead.
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated; you can set variables directly with
--variable-name=value.
--sigint-ignore Ignore SIGINT (CTRL-C)
-o, --one-database Only update the default database. This is useful for
skipping updates to other database in the update log.
--pager[=name] Pager to use to display results. If you don't supply an
option the default pager is taken from your ENV variable
PAGER. Valid pagers are less, more, cat [> filename],
etc. See interactive help (\h) also. This option does not
work in batch mode.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-P, --port=# Port number to use for connection.
--prompt=name Set the mysql prompt to this value.
--protocol=name The protocol of connection (tcp,socket,pipe,memory).
-q, --quick Don't cache result, print it row by row. This may slow
down the server if the output is suspended. Doesn't use
history file.
-r, --raw Write fields without conversion. Used with --batch.
--reconnect Reconnect if the connection is lost. Disable with
--disable-reconnect. This option is enabled by default.
-s, --silent Be more silent. Print results with a tab as separator,
each row on new line.
-S, --socket=name Socket file to use for connection.
-t, --table Output in table format.
-T, --debug-info Print some debug info at exit.
--tee=name Append everything into outfile. See interactive help (\h)
also. Does not work in batch mode.
-u, --user=name User for login if not current user.
-U, --safe-updates Only allow UPDATE and DELETE that uses keys.
-U, --i-am-a-dummy Synonym for option --safe-updates, -U.
-v, --verbose Write more. (-v -v -v gives the table output format).
-V, --version Output version information and exit.
-w, --wait Wait and retry if connection is down.
--connect_timeout=# Number of seconds before connection timeout.
--max_allowed_packet=#
Max packet length to send to, or receive from server
--net_buffer_length=#
Buffer for TCP/IP and socket communication
--select_limit=# Automatic limit for SELECT when using --safe-updates
--max_join_size=# Automatic limit for rows in a join when using
--safe-updates
--secure-auth Refuse client connecting to server if it uses old
(pre-4.1.1) protocol

Default options are read from the following files in the given order:
/etc/my.cnf /usr/local/var/my.cnf ~/.my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read

Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
auto-rehash TRUE
character-sets-dir (No default value)
default-character-set latin1
compress FALSE
database (No default value)
delimiter ;
vertical FALSE
force FALSE
named-commands FALSE
local-infile FALSE
no-beep FALSE
host (No default value)
html FALSE
xml FALSE
line-numbers TRUE
unbuffered FALSE
column-names TRUE
sigint-ignore FALSE
port 3306
prompt mysql>
quick FALSE
raw FALSE
reconnect FALSE
socket (No default value)
table FALSE
debug-info FALSE
user cactiuser
safe-updates FALSE
i-am-a-dummy FALSE
connect_timeout 0
max_allowed_packet 16777216
net_buffer_length 16384
select_limit 1000
max_join_size 1000000
secure-auth FALSE
Installing new files...
***************************************************************************************************
Installation complete. MAKE SURE YOU MODIFY YOUR CRONTAB (crontab -e on most systems):

Replace the line:
*/5 * * * * php ../cacti-0.8.6f//poller.php > /dev/null > /dev/null 2>&1
With:
*/5 * * * * php ../cacti-0.8.6f//poller.php >/dev/null 2>&1 && php ../cacti-0.8.6f//thold/check-thold.php > /dev/null 2>&1
****************************************************************************************************
alexus@d:/tmp/thold>

assuming its all good, i now do db

alexus@d:/tmp/thold> mysql -p cacti < thold.sql
Enter password:
ERROR 1062 (23000) at line 46: Duplicate entry '18-1' for key 1
alexus@d:/tmp/thold>

line 46 is

INSERT INTO `user_auth_realm` VALUES (18, 1);
INSERT INTO `user_auth_realm` VALUES (19, 1);

INSERT INTO settings VALUES ('alert_bl_past_default',86400);
INSERT INTO settings VALUES ('alert_bl_timerange_def',10800);
INSERT INTO settings VALUES ('alert_bl_percent_def',20);
INSERT INTO settings VALUES ('alert_bl_trigger',3);

so i just went there made sure all this inside of my db

mysql> select * from user_auth_realm;
+----------+---------+
| realm_id | user_id |
+----------+---------+
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 1 |
| 5 | 1 |
| 7 | 1 |
| 8 | 1 |
| 9 | 1 |
| 10 | 1 |
| 11 | 1 |
| 12 | 1 |
| 13 | 1 |
| 14 | 1 |
| 15 | 1 |
| 16 | 1 |
| 17 | 1 |
| 18 | 1 |
| 19 | 1 |
+----------+---------+
18 rows in set (0.00 sec)

mysql>

and

mysql> select * from settings where name="alert_bl_past_default";
+-----------------------+-------+
| name | value |
+-----------------------+-------+
| alert_bl_past_default | 86400 |
+-----------------------+-------+
1 row in set (0.00 sec)

mysql> select * from settings where name="alert_bl_timerange_def";
+------------------------+-------+
| name | value |
+------------------------+-------+
| alert_bl_timerange_def | 10800 |
+------------------------+-------+
1 row in set (0.00 sec)

mysql> select * from settings where name="alert_bl_percent_def";
+----------------------+-------+
| name | value |
+----------------------+-------+
| alert_bl_percent_def | 20 |
+----------------------+-------+
1 row in set (0.00 sec)

mysql> select * from settings where name="alert_bl_trigger_def";
Empty set (0.00 sec)

mysql> select * from settings where name="alert_bl_trigger";
+------------------+-------+
| name | value |
+------------------+-------+
| alert_bl_trigger | 3 |
+------------------+-------+
1 row in set (0.01 sec)

mysql>


so i guess its all there as i would just import it there...

yet

when i go to devices and click auto-create thershold i get

Update failed:
INSERT INTO thold (element, rra) VALUES (, 57)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 57)' at line 1

and if i go to DS and select templates its all seting up nicely

i set up thold for incoming and outgoing traffic

put email where to notify me if certain thold is reached

but it wont notify me

:(

someone please help me!!
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
wingfox
Posts: 11
Joined: Tue Jun 21, 2005 3:06 am
Location: Mallorca (Balearic Islands) SPAIN

Post by wingfox »

I've tried to install the Thold.2.1b version, but it does the same. It installs ok, but when I open the cacti, and I want to view the graphs, these don't appear.

Is it normal??? I must change something on my configuration????
Has someone had the same problem???
<__Wingfox__>
egolaw
Posts: 4
Joined: Mon Nov 15, 2004 7:14 am

Thold 2.1a - Thresholding/Alerting module for cacti 8.6

Post by egolaw »

Hi
I got this error when trying to open the threshold
Table 'cactdb.thold_data' doesn't exist

thanks

Lawrence
tenkawa69
Posts: 5
Joined: Wed Jun 29, 2005 5:25 am

thold for cacti-8.6f

Post by tenkawa69 »

hello , everybody
this patch for cacti is incredible.
thx for the developper

i would like to know when the new version wiil be added for cacti-8.6f

thx again.
alexus
Posts: 40
Joined: Fri Feb 04, 2005 8:38 pm
Location: Brooklyn, New York
Contact:

Post by alexus »

hold up... that 2.0b for which cacti version is that??
[url]http://alexus.org/[/url] - [url]http://alexus.biz/[/url] - [url]http://alexus.fm/[/url] - [url]http://lexus.gs/[/url]
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

0.8.6c, and perhaps 0.8.6d too.

It is no more than a repackage of Thold 2.1a with some fixes I found on this topic.
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

I had an idea for Thold... Was wondering if the authors migtht consider it. It seems to me that this could be fairly easily turned into an automated reporting tool of sorts...

A user in another thread was needing a graph for the boss of activity 8:00 - 5:00 M - F. Got to thinking that Thold already has about 90% of the ingredients... (although I may be thinking wrong!)

Thold runs as a scheduled task already, so the "morph" of Thold would be scheduled to run at whatever reporting period was desired... Say 5:00pm in this case.

Thold already has email/graph attachment capability when a threshold is crossed... In this case, it would simply skip the threshold check routine and send an email regardless.

The part that might pose a little work would be defining the graph period (past 9 hours in this case rather than 24).

Thinking out loud, but thought it'd be just almost as cool and useful as the original!

Jason
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

jas0420 wrote:I had an idea for Thold... Was wondering if the authors migtht consider it. It seems to me that this could be fairly easily turned into an automated reporting tool of sorts...

A user in another thread was needing a graph for the boss of activity 8:00 - 5:00 M - F. Got to thinking that Thold already has about 90% of the ingredients... (although I may be thinking wrong!)

Thold runs as a scheduled task already, so the "morph" of Thold would be scheduled to run at whatever reporting period was desired... Say 5:00pm in this case.

Thold already has email/graph attachment capability when a threshold is crossed... In this case, it would simply skip the threshold check routine and send an email regardless.

The part that might pose a little work would be defining the graph period (past 9 hours in this case rather than 24).

Thinking out loud, but thought it'd be just almost as cool and useful as the original!

Jason
I've been doing a lot of brainstorming on this lately and am starting on my first draft of the plugin for it. The first thing I will incorporate is the ability to create a "report" that is sent out every day, with what every graphs from whatever hosts you want (user selectable). The graphs are actually attached to the emails and embedded into the html (current thold only adds an image tag to the email, which is bad!). That is the easy part, I later plan on adding the ability to do all sorts of stuff like overall bandwidth display, maybe some different charts, ect... but this will get it started for now.
Locked

Who is online

Users browsing this forum: No registered users and 2 guests