Cactiusers.org


It is currently Thu May 17, 2012 9:26 am




Post new topic Reply to topic  [ 12 posts ] 
 haloe bug 
Author Message
New User

Joined: Wed Dec 14, 2005 10:41 pm
Posts: 23
Post haloe bug
Under the haloe plugin-->Removals.

Just add entry . click "Save" button, "The Page can not be displayed" comes up, and it dumps php error in /var/log/httpd_error.log

[client 192.168.25.11] PHP Notice: Undefined variable: where_hostfilter in /usr/local/cacti/plugins/haloe/html/haloe_filter_selector.php on line 18, referer: http://10.221.114.17/plugins/haloe/haloe_remove.php
[Wed Feb 01 12:03:13 2006] [notice] child pid 10475 exit signal Segmentation fault (11)


Tue Jan 31, 2006 8:10 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post Re: haloe bug
farhan wrote:
Under the haloe plugin-->Removals.

Just add entry . click "Save" button, "The Page can not be displayed" comes up, and it dumps php error in /var/log/httpd_error.log

[client 192.168.25.11] PHP Notice: Undefined variable: where_hostfilter in /usr/local/cacti/plugins/haloe/html/haloe_filter_selector.php on line 18, referer: http://10.221.114.17/plugins/haloe/haloe_remove.php
[Wed Feb 01 12:03:13 2006] [notice] child pid 10475 exit signal Segmentation fault (11)


Wierd, I can't seem to reproduce this on my test system. The second wierd thing is that haloe_filter_selector.php is never even loaded by haloe_remove.php.

Can you zip and attach your haloe directory, so I can take a look at it?


Tue Jan 31, 2006 8:52 pm
New User

Joined: Wed Dec 14, 2005 10:41 pm
Posts: 23
Post 
Hi Jimmy,

It was my mistake. Actually I have been using syslog-ng database. And in

this database the field name was msg instead of message. So, i changed

my column name from msg to message in database, everything is perfect

now.

Sorry for that.

One more thing is that I am desparate to restrict users to view specific

hosts,messages under haloe and monitor. Is it doable? Could you include

that in your list.

Thanks,

Farhan


Tue Jan 31, 2006 9:15 pm
New User

Joined: Wed Dec 14, 2005 10:41 pm
Posts: 23
Post farhan
Everything looks like perfect. But I am contineaoulsy receiving follwoing message in httpd_error.log

[client 192.168.25.11] PHP Notice: Undefined variable: where_hostfilter in /usr/local/cacti/plugins/haloe/html/haloe_filter_selector.php on line 18, referer: http://10.221.114.17/plugins/haloe/haloe_remove.php

And one more thing about removals is it any cronjob for that? or just we

can delete at once. But if it is one then why it is creating a entry

under "Syslog Removal".


Tue Jan 31, 2006 9:30 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post Re: farhan
farhan wrote:
Everything looks like perfect. But I am contineaoulsy receiving follwoing message in httpd_error.log

[client 192.168.25.11] PHP Notice: Undefined variable: where_hostfilter in /usr/local/cacti/plugins/haloe/html/haloe_filter_selector.php on line 18, referer: http://10.221.114.17/plugins/haloe/haloe_remove.php

And one more thing about removals is it any cronjob for that? or just we

can delete at once. But if it is one then why it is creating a entry

under "Syslog Removal".


I think I found where the problem is, its not in haloe_remove.php at all, I was confused by your logs showing the referer, which is just the take you clicked from. In either case, I believe I have fixed this error now, just redownload it, and use the new haloe.php file and give it ago.

When you add a removal rule, it currently removes all current items that match that, and all future items, so you will never see that item again. It runs everytime the syslog adds items to the "processed" database (right after every polling cycle).


Tue Jan 31, 2006 9:57 pm
New User

Joined: Wed Dec 14, 2005 10:41 pm
Posts: 23
Post 
Cool. Everything is working fine now. No more error in httpd_error.log.

But one more thing if you manually run php poller.php it is giving following

warnings.

PHP Warning: Invalid argument supplied for foreach() in /usr/local/cacti/plugins/haloe/setup.php on line 59
PHP Warning: Invalid argument supplied for foreach() in /usr/local/cacti/plugins/haloe/setup.php on line 97

And I could not understand the difference between syslog and syslog-

incoming tables. But i have been using my haloe_logs table.

host | varchar(32) | YES | MUL | NULL | |
| facility | varchar(10) | YES | MUL | NULL | |
| priority | varchar(10) | YES | MUL | NULL | |
| level | varchar(10) | YES | | NULL | |
| tag | varchar(10) | YES | | NULL | |
| date | date | YES | MUL | NULL | |
| time | time | YES | MUL | NULL | |
| program | varchar(15) | YES | MUL | NULL | |
| message | text | YES | | NULL | |
| seq | int(10) unsigned | | PRI | NULL | auto_increment

So , i defined haloe_logs as haloe_table and haloe_incoming table in

config.php . But there is no status column in this table so thats why it is

giving following error.


02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "UPDATE haloe_logs set status=1"
02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select * from haloe_logs where message like '%snmp%' and status=1"
02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT * FROM haloe_logs where status=1"
02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM haloe_logs WHERE status=1"

It is deleting the entries but any suggestion to get rid of these errors.

Thanks


Tue Jan 31, 2006 10:27 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
farhan wrote:
Cool. Everything is working fine now. No more error in httpd_error.log.

But one more thing if you manually run php poller.php it is giving following

warnings.

PHP Warning: Invalid argument supplied for foreach() in /usr/local/cacti/plugins/haloe/setup.php on line 59
PHP Warning: Invalid argument supplied for foreach() in /usr/local/cacti/plugins/haloe/setup.php on line 97

And I could not understand the difference between syslog and syslog-

incoming tables. But i have been using my haloe_logs table.

host | varchar(32) | YES | MUL | NULL | |
| facility | varchar(10) | YES | MUL | NULL | |
| priority | varchar(10) | YES | MUL | NULL | |
| level | varchar(10) | YES | | NULL | |
| tag | varchar(10) | YES | | NULL | |
| date | date | YES | MUL | NULL | |
| time | time | YES | MUL | NULL | |
| program | varchar(15) | YES | MUL | NULL | |
| message | text | YES | | NULL | |
| seq | int(10) unsigned | | PRI | NULL | auto_increment

So , i defined haloe_logs as haloe_table and haloe_incoming table in

config.php . But there is no status column in this table so thats why it is

giving following error.


02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "UPDATE haloe_logs set status=1"
02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select * from haloe_logs where message like '%snmp%' and status=1"
02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT * FROM haloe_logs where status=1"
02/01/2006 02:22:47 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM haloe_logs WHERE status=1"

It is deleting the entries but any suggestion to get rid of these errors.

Thanks


The documentation on this plugin is being completed currently was its still in beta, but I will lay it out a little now, as its a little different than the normal haloe plugin.

Syslog_incoming : This is the table that all new messages are written to, so for instance, if you are using msyslog, or syslog-ng, this is where they would need to write to. We have seperate tables for "new" and "processed" syslog messages, so that we can process alerts and removals before they are inserted into the normal syslog table. This is done every polling cycle. The "status" column is absolutely required, so that we can make sure we don't have new syslog messages slip past the filters after they have ran, but before they are moved.

Syslog: these are all the messages that made it past the "removal" stage and made it into the viewing database. When you view the syslog, these are what you see. It is updated every 5 minutes.

I had thought to use just 1 database, instead of having an "incoming" but when dealing with large amounts of messages (100,000 in a 5 minute period) it was too much overhead for the server to deal with. This way, the process is actually extremely fast.

------------------------------------------

So basically, you just need to add the status column to your haloe_logs database. It is basically replacing the incoming table so use it in "haloe_incoming". Then you will need the syslog table, and have it set as "haloe_table"


Tue Jan 31, 2006 11:06 pm
New User

Joined: Wed Dec 14, 2005 10:41 pm
Posts: 23
Post 
Thanks a lot. I have done suggested changes and it is working like a

champ.

For tool plugin, I can get service status and snmpwalk result. But it is

generating heaps of errors in httpd_error.log.

The following error in result of service check

[client 192.168.25.11] PHP Notice: Undefined index: tools.php:servicecheck in /usr/local/cacti/lib/functions.php on line 1357, referer: http://10.221.114.17/plugins/tools/tools.php

And the following error is in the result of snmpwalk. It is generating one line for one OID. Suppose if snmpwalk returns you 200 lines there will be 200 errors in httpd-error.log as well.

[client 192.168.25.11] PHP Notice: Use of undefined constant oid - assumed 'oid' in /usr/local/cacti/plugins/tools/tools.php on line 125, referer: http://10.221.114.17/plugins/tools/tools.php
[client 192.168.25.11] PHP Notice: Use of undefined constant oid - assumed 'oid' in /usr/local/cacti/plugins/tools/tools.php on line 125, referer: http://10.221.114.17/plugins/tools/tools.php


Tue Jan 31, 2006 11:34 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
farhan wrote:
For tool plugin, I can get service status and snmpwalk result. But it is
generating heaps of errors in httpd_error.log.


Thanks, these errors should now be taken care of. Give it another go if you like.


Tue Jan 31, 2006 11:47 pm
New User

Joined: Wed Dec 14, 2005 10:41 pm
Posts: 23
Post 
Great. Everything is fine now. I need you little bit help more how can i restrict users to view specific hosts and messages under monitor and haloe plugin. I know i am answering this question repeatidly. But I want to do it. Could you give me some hint?

Heaps of thanks,

Farhan


Wed Feb 01, 2006 12:03 am
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
farhan wrote:
Great. Everything is fine now. I need you little bit help more how can i restrict users to view specific hosts and messages under monitor and haloe plugin. I know i am answering this question repeatidly. But I want to do it. Could you give me some hint?

Heaps of thanks,

Farhan


Currently you can't, but its on my TODO list. Main issue with the Syslog table, is that it creates a major SQL query when parsing out what hosts they can see, and only display those messages.


Wed Feb 01, 2006 12:11 am
New User

Joined: Wed Dec 14, 2005 10:41 pm
Posts: 23
Post 
Thanks a lot. I will be waiting for any type of solution.

Farhan


Wed Feb 01, 2006 12:15 am
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: