Problems with Hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with Hosts

Post by scottwilkerson »

you did create the UCD-TRAP-TEST-MIB.txt correct?

Are you testing this from your Nagios Server?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: Problems with Hosts

Post by shakra2005 »

this is my trap

D-TRAP-TEST-MIB DEFINITIONS ::= BEGIN
IMPORTS ucdExperimental FROM UCD-SNMP-MIB;

demotraps OBJECT IDENTIFIER ::= { ucdExperimental 990 }

demoTrap TRAP-TYPE
ENTERPRISE demotraps
VARIABLES { sysLocation }
DESCRIPTION "An example of an SMIv1 trap"
::= 17

END

and i am running that from my nagios server

CISCO:

Return code of 126 is out of bounds - plugin may not be executable)

This is showing on any monitoring device that tries to monitor port bandwidth.

I have this error showing up when i try and monitor both watch guard and cisco switches.

Any ideas which plugin/ plugin location would be causing the issue?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with Hosts

Post by scottwilkerson »

Run

Code: Select all

chmod +x /usr/local/nagios/libexec/check_rrdtraf
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: Problems with Hosts

Post by shakra2005 »

now the service check is running :-)


Is my test trap mib correct ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with Hosts

Post by scottwilkerson »

shakra2005 wrote:Is my test trap mib correct ?
No, the MIB should look like this

Code: Select all

UCD-TRAP-TEST-MIB DEFINITIONS ::= BEGIN
IMPORTS ucdExperimental FROM UCD-SNMP-MIB;
demotraps OBJECT IDENTIFIER ::= { ucdExperimental 990 }
demoTrap TRAP-TYPE
ENTERPRISE demotraps
VARIABLES { sysLocation }
DESCRIPTION "An example of an SMIv1 trap"
::= 17
END
Then you will need to restart the services
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: Problems with Hosts

Post by shakra2005 »

No log handling enabled - turning on stderr logging
SNMPv2-MIB::syslocation.0: Unknown Object Identifier

hast anyone a sample config for me ?
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: Problems with Hosts

Post by shakra2005 »

snmptt is running on localhost. Now i have created the Database snmptt with the tables snmptt, snmptt_statistics, snmptt_unknown

CREATE TABLE snmptt.snmptt_unknown (
id mediumint(9) NOT NULL auto_increment,
trapoid varchar(100) default NULL,
enterprise varchar(100) default NULL,
community varchar(20) default NULL,
hostname varchar(100) default NULL,
agentip varchar(16) default NULL,
uptime varchar(20) default NULL,
traptime varchar(30) default NULL,
formatline varchar(255) default NULL,
trapread int(11) default '0',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE snmptt.snmptt (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
eventname VARCHAR(50),
eventid VARCHAR(50),
trapoid VARCHAR(100),
enterprise VARCHAR(100),
community VARCHAR(20),
hostname VARCHAR(100),
agentip VARCHAR(16),
category VARCHAR(20),
severity VARCHAR(20),
uptime VARCHAR(20),
traptime VARCHAR(30),
formatline VARCHAR(255));

CREATE TABLE snmptt.snmptt_statistics (
stat_time VARCHAR(30),
total_received BIGINT,
total_translated BIGINT,
total_ignored BIGINT,
total_unknown BIGINT);

GRANT ALL ON snmptt.* to 'snmptt'@'localhost' identified by 'snmptt';

i have set the login ceredentials in snmptt.ini

now the following error comes.
MySQL error: Unable to connect to database: Access denied for user 'snmptt '@'localhost' (using password: YES)

i see the traps in the unknownlogfile
i dont see the trap in nagiosxi configured with the snmp trap wizard
how to install CISCO-STACK-MIB.my
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with Hosts

Post by scottwilkerson »

If you are seeing them in the unknown log the mib wasn't added

See page 2 of this document "Installing MIBs"
http://assets.nagios.com/downloads/nagi ... ith_XI.pdf

As for logging to mysql, I'm not totally familiar with this but did you set the credentials something like this:

Code: Select all

[SQL]
db_translate_enterprise = 0
db_unknown_trap_format = '$-*'
mysql_dbi_host = localhost
mysql_dbi_port = 3306
mysql_dbi_database = snmptt
mysql_dbi_table = snmptt
mysql_dbi_table_unknown = snmptt_unknown
mysql_dbi_username = snmptt
mysql_dbi_password = snmptt
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: Problems with Hosts

Post by shakra2005 »

its that the onlay thing to do ?

i have added the mibs with snmpttconvertmib
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with Hosts

Post by scottwilkerson »

did you run the addmib command as per the documentation?
you will also need to restart the service
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked