Create Graphs for this Device/Error in data query

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Mintaeyeon
Posts: 5
Joined: Fri Oct 19, 2018 12:55 am

Create Graphs for this Device/Error in data query

Post by Mintaeyeon »

After Click "Create Graphs for this Device"

--------------------------------------------------------
Data Query [SNMP - Interface Statistics]

Error in data query.
--------------------------------------------------------
How can i solve this problem?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Create Graphs for this Device/Error in data query

Post by netniV »

Is the device status showing as up? Can you post a screenshot?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Mintaeyeon
Posts: 5
Joined: Fri Oct 19, 2018 12:55 am

Re: Create Graphs for this Device/Error in data query

Post by Mintaeyeon »

this is the screenshot.

thank you for replying to my question.
Attachments
error
error
cacti_error.png (126.73 KiB) Viewed 687 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Create Graphs for this Device/Error in data query

Post by netniV »

That basically means that the web site was unable to read the XML file for the interface statistics data query due to permissions or corruption. Verify this (replacing <path_cacti> with your cacti root folder, eg /usr/share/cacti/):
  1. Goto Console -> Data Collections -> Data Queries
  2. Edit the SNMP - Interface Statistics query
  3. Examine the XML Path field which should read:
    <path_cacti>/resource/snmp_queries/interface.xml
  4. Open a shell session and navigate to the folder holding the XML file
  5. Check that the permissions are such that both the website and the poller (users may be different for each one) are able to read that file
    • sudo -u <website user> cat <path_cacti>/resource/snmp_queries/interface.xml
    • sudo -u <poller user> cat <path_cacti>/resource/snmp_queries/interface.xml
  6. If they are both able to read it, make sure that the XML is valid and has not been corrupted.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Mintaeyeon
Posts: 5
Joined: Fri Oct 19, 2018 12:55 am

Re: Create Graphs for this Device/Error in data query

Post by Mintaeyeon »

I tried (5) and then i got

/usr/share/cacti/resource/snmp_queries/interface.xml: permission denied

so, i changed the file permission 777. but still i got same answer.

how can i solve this problem?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Create Graphs for this Device/Error in data query

Post by netniV »

Check whether you have SELinux enabled, if so, you may have to set it to either permissive and/or grant permissions to the website user (not the file permissions but selinux permissions).
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Mintaeyeon
Posts: 5
Joined: Fri Oct 19, 2018 12:55 am

Re: Create Graphs for this Device/Error in data query

Post by Mintaeyeon »

sudo -u <website user> cat <path_cacti>/resource/snmp_queries/interface.xml

I changed the mode of selinux from 'enable' to 'permissive'. Then, Above command line is working. But, the user seems like 'poller user' is not in '/etc/passwd'.

what can i do?

By the way, Really thank you!!!
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Create Graphs for this Device/Error in data query

Post by netniV »

The poller user, is normally the one found in /etc/cron.d/cacti (or the equivalent on your system). It will generally be the first column after the last time fields and before the php command.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Mintaeyeon
Posts: 5
Joined: Fri Oct 19, 2018 12:55 am

Re: Create Graphs for this Device/Error in data query

Post by Mintaeyeon »

I got a new problem.

I clicked the devices to create graph. but, it doesn't work.

The interfaces is not shown... How can i solve this problem?
Attachments
error.png
error.png (142.8 KiB) Viewed 632 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Create Graphs for this Device/Error in data query

Post by netniV »

Try emptying the search filter.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests