Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/html/cacti/scripts/lmgrd-query.pl <FQDN> 25734 index'
+ Executing script query 'perl /var/www/html/cacti/scripts/lmgrd-query.pl <FQDN> 25734 query appname'
+ Executing script query 'perl /var/www/html/cacti/scripts/lmgrd-query.pl <FQDN> 25734 query package'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
Could not create new IPC::ShareLite object: Permission denied at /var/www/html/cacti/scripts/lmgrd-query.pl line 8
Where do I set/change this permission?
You don't. lmgrd-query.pl shouldn't be creating the object, just reading it. The IPC code is specifically called read-only from the query script. Is the poller running? Can you run the test and get valid data?
pvenezia wrote:
You don't. lmgrd-query.pl shouldn't be creating the object, just reading it. The IPC code is specifically called read-only from the query script. Is the poller running? Can you run the test and get valid data?
Then, yes I get valid data from the test see my first post above. I'm thinking the error in my apache error log are pointing to the problem...I'm just not sure what it is...
BTW Thanks for your hard work in developing this script and answering questions, I'm really excited to try to get it working.
I see where you've setup a switch on argument 2, the function. In the cacti debug it lists using both "query" and "index" as function arguments but never "get" which seem to be the heart of the script. Where is the script called with this argument?
shoe wrote:I'm looking at your perl and following along.
I see where you've setup a switch on argument 2, the function. In the cacti debug it lists using both "query" and "index" as function arguments but never "get" which seem to be the heart of the script. Where is the script called with this argument?
n/m found it in the xml template, you'll have to forgive me as I'm new to cacti.
I still get 0 rows of data however. What's interesting is I can run the exact perl command(s) that are listed in cacti's debug and they all work perfectly.
Okay I finally got it figured out. The errors in my apache error log were pointing me in the right direction. It turns out the SELinux was not allowing apache/php to run lmutil. Once I disabled that it all worked fine. I haven't played with linux in a while so I was unaware that SELinux is enabled on Fedora 6 by default. Since this is a dev machine I don't really need it. Thanks for all the help and work on the scripts.
+ Running data query [13].
+ Found type = '4 '[script query].
+ Found data query XML file at '<cactiPath>/cacti/resource/script_queries/lmgrd.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl <cactiPath>/cacti/scripts/lmgrd-query.pl FQDN xxx index'
+ Executing script query 'perl <cactiPath>/cacti/scripts/lmgrd-query.pl FQDN xxx query appname'
+ Executing script query 'perl <cactiPath>/cacti/scripts/lmgrd-query.pl FQDN xxx query package'
+ Found data query XML file at '<cactiPath>/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '<cactiPath>/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '<cactiPath>/cacti/resource/script_queries/lmgrd.xml'
...but it says "This data query returned 0 rows, perhaps there was a problem executing this data query" ... I'm not able to figure out whats going wrong... executing "perl lmgrd_query.pl FQDN xxx index" returns nice list
quorks987 wrote:
...but it says "This data query returned 0 rows, perhaps there was a problem executing this data query" ... I'm not able to figure out whats going wrong... executing "perl lmgrd_query.pl FQDN xxx index" returns nice list
Check to see if SELinux is enabled. This will block script execution if not properly configured. Also, ensure that the FQDN matches exactly.
I manage to install and use this script. Cool! I think my boss like it.
Thanks pvenezia and nick@seakr.com! Any new updates?
I not sure whether is it a script bug or cacti bug but here is the thing:
On Application/Vendor that has a lot of features (like more than 50 features), if I select all feature and create the graph, it does not disable the feature that it already created the graph. That mean, I can keep on selecting the same feature(s) again and again and the end results is that I will have alot of same graphs of the same features.
For Applications/Vendor that has leser feature, it does not have that problem because those feature that already selected to generate graph will be disabled.
This app is exactly what I'm looking for, but my problem is that I'm running all of this on Windows and the Perl scripts (including Tie::Sharelite) are built for a UNIX/Linux environment. Can anyone point me in the right direction on where I could go to solve this problem? Thanks.