SNMP Information, snmp error

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: SNMP Information, snmp error

Post by Linegod »

If it is not taking the change for logging level, you may have other issues. Make sure the user you have set in 'include/config.php' has the ability to write to the complete database.

To test snmp connectivity, from a console on the server that is running cacti do:

snmpwalk -v2c -c {communitystring} 10.x.x.x system
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
graver347
Posts: 17
Joined: Fri Feb 10, 2012 1:36 am

Re: SNMP Information, snmp error

Post by graver347 »

Dear Master,

in my "setting" table, there's no name "log_verbosity"

Code: Select all

mysql> SELECT * FROM settings WHERE name="log_verbosity";
Empty set (0.00 sec)
This is when i snmpwalk to localhost :

Code: Select all

[root@jktcatalogdb-01 log]# snmpwalk -v2c -c public localhost system
SNMPv2-MIB::sysDescr.0 = STRING: Linux catlogdb-01 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (23201183) 2 days, 16:26:51.83
SNMPv2-MIB::sysContact.0 = STRING: Root  (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: jktcatalogdb-01
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00
but, snmpwalk to cacti client is not response :)

so, how to check the log with this condition?
thanks for help :)
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: SNMP Information, snmp error

Post by Linegod »

Don't test to localhost, test to the client you want to talk to.

Do an snmpwalk of the REMOTE host , from the device that cacti is installed on.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
graver347
Posts: 17
Joined: Fri Feb 10, 2012 1:36 am

Re: SNMP Information, snmp error

Post by graver347 »

This is the result snmpwalk to remote host

Code: Select all

# snmpwalk -v2c -c public 10.210.41.11 system
Timeout: No Response from 10.210.41.11
base on my post before, snmp information is error for all remote host
only localhost snmp information not error

Code: Select all

(10.210.41.11)
SNMP Information
SNMP error 
please suggestion :)
graver347
Posts: 17
Joined: Fri Feb 10, 2012 1:36 am

Re: SNMP Information, snmp error

Post by graver347 »

This is (one of) error message in cacti log file for Remote Host :

Console -> Utilities -> View Cacti Log File

Code: Select all

02/20/2012 01:55:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1036', SQL:"update host set status = '3', status_event_count = '1', status_fail_date = '2012-02-20 13:55:34', status_rec_date = '2012-01-23 00:05:28', status_last_error = 'Host did not respond to SNMP', min_time = '9.99999', max_time = '1979.71000', cur_time = '55.71000', avg_time = '60.10901', total_polls = '55119', failed_polls = '13', availability = '99.976414666449' where hostname = '10.211.12.23'' 
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: SNMP Information, snmp error

Post by noname »

graver347 wrote: Console -> Utilities -> View Cacti Log File

Code: Select all

02/20/2012 01:55:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1036', SQL:...
MySQL error 1036 is "Table 'xxxx' is read only".
Please make sure your DB privileges as Linegod mentioned above.
Linegod wrote:If it is not taking the change for logging level, you may have other issues. Make sure the user you have set in 'include/config.php' has the ability to write to the complete database.
Otherwise,
graver347 wrote:This new cacti is migrate from one server to another server (called new server)
If you have simply moved MySQL data directories when Cacti was migrated, check owner/group permissions of these files.

For example:

Code: Select all

# mysql -u root -p -e 'SHOW VARIABLES;' | grep datadir
datadir /var/mysql/

# ls -l /var/mysql/cacti
-rw-rw---- 1 mysql mysql   392 Jan 26 13:18 cdef.MYD
-rw-rw---- 1 mysql mysql  2048 Jan 26 13:18 cdef.MYI
-rw-rw---- 1 mysql mysql  8616 Dec 12 14:04 cdef.frm
-rw-rw---- 1 mysql mysql   936 Jan 26 13:18 cdef_items.MYD
-rw-rw---- 1 mysql mysql  3072 Jan 26 13:18 cdef_items.MYI
-rw-rw---- 1 mysql mysql  8722 Dec 12 14:04 cdef_items.frm
-rw-rw---- 1 mysql mysql  2020 Jan 26 13:18 colors.MYD
-rw-rw---- 1 mysql mysql  2048 Jan 26 13:18 colors.MYI
-rw-rw---- 1 mysql mysql  8584 Dec 12 14:04 colors.frm
......
graver347
Posts: 17
Joined: Fri Feb 10, 2012 1:36 am

Re: SNMP Information, snmp error

Post by graver347 »

i was setting grant all on cacti.* (cacti table) to root as like user in my /include/config.php

Code: Select all

GRANT ALL ON cacti.* TO 'root'@'localhost' IDENTIFIED BY 'passwd';
GRANT ALL ON cacti.* TO 'root'@'localhost' IDENTIFIED BY 'passwd';
FLUSH PRIVILEGES;
after i check in /var/lib/mysql/cacti

Code: Select all

owner/group = mysql/mysql
permissions = -rw-r--r--
now i change permission to :

Code: Select all

owner/group = mysql/mysql
permissions = -rw-rw----
but i stil getting error like before :(

and what can i do for status_last_error = 'Host did not respond to SNMP' that i mention before @ Console -> Utilities -> View Cacti Log File
how can i do some trick to solve it?
graver347
Posts: 17
Joined: Fri Feb 10, 2012 1:36 am

Re: SNMP Information, snmp error

Post by graver347 »

i read some topic in this forum
that's recomended to repair table

i check to mysql table information
there are some status like this :

Code: Select all

host_snmp_cache 	1447 	MyISAM 	latin1_swedish_ci 	11 clients are using or haven't closed the table properly
i try to repair with repair_database.php in [cacti_path]/cli :

Code: Select all

php -q repair_database.php
status repair successfull

but i check in mysql query
there's still have message like this (like in my attachement)

Code: Select all

mysql> check table host_snmp_cache;
+-----------------------+-------+----------+-----------------------------------------------------------+
| Table                 | Op    | Msg_type | Msg_text                                                  |
+-----------------------+-------+----------+-----------------------------------------------------------+
| cacti.host_snmp_cache | check | warning  | 11 clients are using or haven't closed the table properly |
| cacti.host_snmp_cache | check | status   | OK                                                        |
+-----------------------+-------+----------+-----------------------------------------------------------+
2 rows in set (0.01 sec)
when i try to repair again in mysql query, table is readonly
like i tell before, i was set permission to read write to all cacti table:)
so why it's still readonly???

Code: Select all

mysql> repair table host_snmp_cache;
+-----------------------+--------+----------+--------------------------------------------+
| Table                 | Op     | Msg_type | Msg_text                                   |
+-----------------------+--------+----------+--------------------------------------------+
| cacti.host_snmp_cache | repair | error    | Table 'cacti.host_snmp_cache' is read only |
+-----------------------+--------+----------+--------------------------------------------+
1 row in set, 1 warning (0.00 sec)
and fyi, i was stop cron poller.php till now

please help for this condition, why table it's still read only ?
Attachments
mysql table information.JPG
mysql table information.JPG (97.11 KiB) Viewed 2516 times
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: SNMP Information, snmp error

Post by noname »

It appears that your DB is partly broken..
Try "myisamchk --check" and "myisamchk --recover" (if needed) against these tables.

- http://dev.mysql.com/doc/refman/5.1/en/myisamchk.html
graver347
Posts: 17
Joined: Fri Feb 10, 2012 1:36 am

Re: SNMP Information, snmp error

Post by graver347 »

i was repair my cacti table now
and looks fine, status is OK

my problem now maybe focus to localhost graph still not shown/ update :(
and remote host did'nt respon to SNMP

thanks for help dear master :)
graver347
Posts: 17
Joined: Fri Feb 10, 2012 1:36 am

Re: SNMP Information, snmp error

Post by graver347 »

Voillaaaa!!!
Localhost Graph shown/update/refresh now

but i have do lil' trick for the remote host graph
i will post if i finished it :D
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests