SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...ta_event_name = 'NXTI_Event_1' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...pExampleHeartbeatNotification' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...a_category = 'NXTI Test Event' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...T trapdata_severity = 'Normal' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...ata SET trapdata_raw_data = '' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...yL05YVElfV3JpdGVfVGVzdCI7fQ==' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...finition for testing purposes' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...zard_integration_enabled = '1' WHERE trapdata_id = 1 LIMIT 1
^
SQL Error [nagiosxi] : ERROR: syntax error at or near "LIMIT"
LINE 1: ...gd2l0aCB2YXJpYWJsZXMgJCsqIjt9' WHERE trapdata_id = 1 LIMIT 1
5.5.1 Add a Trap Definition
5.5.1 Add a Trap Definition
NagiosXI 5.5.1 I have error when Add a trap definition and Enable Passive Service Setup
Re: 5.5.1 Add a Trap Definition
One Click System test have error
You do not have the required permissions to view the files attached to this post.
Re: 5.5.1 Add a Trap Definition
I think there could be a permission problem with one of the config files for the SNMP Trap configs which caused it to not send the test trap.
I would need to see the SNMP configuration files and the MIB files from the server so can you run the following 3 commands as root.
Then post these 3 files so i can check the settings and the MIB files for any errors.
Also, can you run the following commands and post the .tmp/info.txt file here?
Thanks
I would need to see the SNMP configuration files and the MIB files from the server so can you run the following 3 commands as root.
Code: Select all
tar cvfz /tmp/snmp.tgz /etc/snmp/*
tar cvfz /tmp/sharesnmp.tgz /usr/share/snmp/mibs/*
tar cvfz /tmp/snmplog.tgz /var/log/snmptt/*Code: Select all
/tmp/snmp.tgz
/tmp/sharesnmp.tgz
/tmp/snmplog.tgz
Code: Select all
ls -al /etc/snmp >/tmp/info.txt
ls -al /usr/share/snmp/mibs >>/tmp/info.txt
echo 'select * from xi_cmp_trapdata;' |mysql -u root -pnagiosxi nagiosxi >>/tmp/info.txtBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: 5.5.1 Add a Trap Definition
Code: Select all
[root@nagios ~]# echo 'select * from xi_cmp_trapdata;' |mysql -u root -pnagiosxi nagiosxi >>/tmp/info.txt
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1049 (42000): Unknown database 'nagiosxi'
tgriep wrote:I think there could be a permission problem with one of the config files for the SNMP Trap configs which caused it to not send the test trap.
I would need to see the SNMP configuration files and the MIB files from the server so can you run the following 3 commands as root.Then post these 3 files so i can check the settings and the MIB files for any errors.Code: Select all
tar cvfz /tmp/snmp.tgz /etc/snmp/* tar cvfz /tmp/sharesnmp.tgz /usr/share/snmp/mibs/* tar cvfz /tmp/snmplog.tgz /var/log/snmptt/*Also, can you run the following commands and post the .tmp/info.txt file here?Code: Select all
/tmp/snmp.tgz /tmp/sharesnmp.tgz /tmp/snmplog.tgz
ThanksCode: Select all
ls -al /etc/snmp >/tmp/info.txt ls -al /usr/share/snmp/mibs >>/tmp/info.txt echo 'select * from xi_cmp_trapdata;' |mysql -u root -pnagiosxi nagiosxi >>/tmp/info.txt
Re: 5.5.1 Add a Trap Definition
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosna |
| nagiosql |
| performance_schema |
| sys |
| test |
+--------------------+
8 rows in set (0.01 sec)
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosna |
| nagiosql |
| performance_schema |
| sys |
| test |
+--------------------+
8 rows in set (0.01 sec)
duhd wrote:Code: Select all
[root@nagios ~]# echo 'select * from xi_cmp_trapdata;' |mysql -u root -pnagiosxi nagiosxi >>/tmp/info.txt mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1049 (42000): Unknown database 'nagiosxi'tgriep wrote:I think there could be a permission problem with one of the config files for the SNMP Trap configs which caused it to not send the test trap.
I would need to see the SNMP configuration files and the MIB files from the server so can you run the following 3 commands as root.Then post these 3 files so i can check the settings and the MIB files for any errors.Code: Select all
tar cvfz /tmp/snmp.tgz /etc/snmp/* tar cvfz /tmp/sharesnmp.tgz /usr/share/snmp/mibs/* tar cvfz /tmp/snmplog.tgz /var/log/snmptt/*Also, can you run the following commands and post the .tmp/info.txt file here?Code: Select all
/tmp/snmp.tgz /tmp/sharesnmp.tgz /tmp/snmplog.tgz
ThanksCode: Select all
ls -al /etc/snmp >/tmp/info.txt ls -al /usr/share/snmp/mibs >>/tmp/info.txt echo 'select * from xi_cmp_trapdata;' |mysql -u root -pnagiosxi nagiosxi >>/tmp/info.txt
Re: 5.5.1 Add a Trap Definition
Your server is probably still using the Postgres database for the nagiosxi database so you will have to run this command instead.
Code: Select all
echo 'select * from xi_cmp_trapdata;' |psql nagiosxi nagiosxi >>/tmp/info.txtBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: 5.5.1 Add a Trap Definition
here al file you need.
tgriep wrote:Your server is probably still using the Postgres database for the nagiosxi database so you will have to run this command instead.Code: Select all
echo 'select * from xi_cmp_trapdata;' |psql nagiosxi nagiosxi >>/tmp/info.txt
You do not have the required permissions to view the files attached to this post.
Re: 5.5.1 Add a Trap Definition
duhd wrote:here al file you need.tgriep wrote:Your server is probably still using the Postgres database for the nagiosxi database so you will have to run this command instead.Code: Select all
echo 'select * from xi_cmp_trapdata;' |psql nagiosxi nagiosxi >>/tmp/info.txt
You do not have the required permissions to view the files attached to this post.
Re: 5.5.1 Add a Trap Definition
Run this command as root to manually add a trap to the database and go in to the Admin > SNMP Trap Interface menu in the gui and see if there is a received trap called "Test Event"
If you do not see it, run the following 2 commands and post the /tmp/info.txt file so we can see the database settings.
Code: Select all
php /usr/local/nagiosxi/scripts/nxti.php --event_name="Test Event" --event_oid=".1.3.6.1.4.1.8072.2.3.0.1" --numeric_oid=".1.3.6.1.4.1.8072.2.3.0.1" --symbolic_oid="NET-SNMP-EXAMPLES-MIB::.iso.org.dod.int
ernet.private.enterprises.netSnmp.netSnmpExamples.netSnmpExampleNotifications.netSnmpExampleNotificationPrefix.netSnmpExampleHeartbeatNotification" --community="" --trap_hostname="localhost" --trap_ip="127.0.0.1" --agent_hostname="
localhost" --agent_ip="127.0.0.1" --category="NXTI Test Event" --severity="Normal" --uptime="88:20:29:22.25" --datetime="2018-07-21 10:06:10" --bindings="netSnmpExampleHeartbeatRate:123456"Code: Select all
echo 'select * from xi_cmp_trapdata_log;' |psql nagiosxi nagiosxi >/tmp/info.txt
echo '\d xi_cmp_trapdata_log;' |psql nagiosxi nagiosxi >>/tmp/info.txtBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: 5.5.1 Add a Trap Definition
Error happen:
Code: Select all
[root@nagios ~]# php /usr/local/nagiosxi/scripts/nxti.php --event_name="Test Event" --event_oid=".1.3.6.1.4.1.8072.2.3.0.1" --numeric_oid=".1.3.6.1.4.1.8072.2.3.0.1" --symbolic_oid="NET-SNMP-EXAMPLES-MIB::.iso.org.dod.internet.private.enterprises.netSnmp.netSnmpExamples.netSnmpExampleNotifications.netSnmpExampleNotificationPrefix.netSnmpExampleHeartbeatNotification" --community="" --trap_hostname="localhost" --trap_ip="127.0.0.1" --agent_hostname=" localhost" --agent_ip="127.0.0.1" --category="NXTI Test Event" --severity="Normal" --uptime="88:20:29:22.25" --datetime="2018-07-21 10:06:10" --bindings="netSnmpExampleHeartbeatRate:123456"
<p><pre>SQL Error [nagiosxi] : ERROR: value too long for type character varying(100)</pre></p>tgriep wrote:Run this command as root to manually add a trap to the database and go in to the Admin > SNMP Trap Interface menu in the gui and see if there is a received trap called "Test Event"If you do not see it, run the following 2 commands and post the /tmp/info.txt file so we can see the database settings.Code: Select all
php /usr/local/nagiosxi/scripts/nxti.php --event_name="Test Event" --event_oid=".1.3.6.1.4.1.8072.2.3.0.1" --numeric_oid=".1.3.6.1.4.1.8072.2.3.0.1" --symbolic_oid="NET-SNMP-EXAMPLES-MIB::.iso.org.dod.int ernet.private.enterprises.netSnmp.netSnmpExamples.netSnmpExampleNotifications.netSnmpExampleNotificationPrefix.netSnmpExampleHeartbeatNotification" --community="" --trap_hostname="localhost" --trap_ip="127.0.0.1" --agent_hostname=" localhost" --agent_ip="127.0.0.1" --category="NXTI Test Event" --severity="Normal" --uptime="88:20:29:22.25" --datetime="2018-07-21 10:06:10" --bindings="netSnmpExampleHeartbeatRate:123456"
Code: Select all
echo 'select * from xi_cmp_trapdata_log;' |psql nagiosxi nagiosxi >/tmp/info.txt echo '\d xi_cmp_trapdata_log;' |psql nagiosxi nagiosxi >>/tmp/info.txt
You do not have the required permissions to view the files attached to this post.