|
|
| Author |
Message |
shoe
Joined: 18 Apr 2007 Posts: 7
|
Posted: Wed Apr 18, 2007 4:37 pm Post subject: frustrated |
|
|
I'm a bit frustrated trying to get this to work.
I've tried both 0.0.2 and 0.0.1 per instructions and get the same result, no data.
I get 0 returned rows and the following debug:
| Code: |
+ 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'
|
Running
| Code: | # perl ./lmgrd-query.pl test
|
Yields
| Code: | Dumping hash...
$VAR1 = '<FQDN>';
$VAR2 = {
'solidworks' => {
'inuse' => '6',
'port' => '25734',
'total' => '9',
'package' => 'Solidworks'
},
'dwgeditor' => {
'inuse' => '0',
'port' => '25734',
'total' => '27',
'package' => 'Solidworks'
},
'swofficepro' => {
'inuse' => '4',
'port' => '25734',
'total' => '9',
'package' => 'Solidworks'
}
};
|
As you can see I'm using Solidworks.
Testing the following command:
| Code: | | perl /var/www/html/cacti/scripts/lmgrd-query.pl <FQDN> 25734 index |
yields a nice list of the three packages.
What am I doing wrong? agghh!
-shoe |
|
| Back to top |
|
 |
shoe
Joined: 18 Apr 2007 Posts: 7
|
Posted: Wed Apr 18, 2007 5:37 pm Post subject: |
|
|
I also found this in my apache error log
| Code: |
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? |
|
| Back to top |
|
 |
pvenezia
Joined: 13 Mar 2006 Posts: 20
|
Posted: Wed Apr 18, 2007 6:54 pm Post subject: Re: frustrated |
|
|
| shoe wrote: | I'm a bit frustrated trying to get this to work.
I've tried both 0.0.2 and 0.0.1 per instructions and get the same result, no data.
Testing the following command:
| Code: | | perl /var/www/html/cacti/scripts/lmgrd-query.pl <FQDN> 25734 index |
yields a nice list of the three packages.
What am I doing wrong? agghh!
-shoe |
It would seem that the script called from Cacti isn't matching on the FQDN. Make sure they match, case sensitive. |
|
| Back to top |
|
 |
pvenezia
Joined: 13 Mar 2006 Posts: 20
|
Posted: Wed Apr 18, 2007 6:57 pm Post subject: |
|
|
| shoe wrote: | I also found this in my apache error log
| Code: |
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? |
|
| Back to top |
|
 |
shoe
Joined: 18 Apr 2007 Posts: 7
|
Posted: Thu Apr 19, 2007 9:23 am Post subject: Re: frustrated |
|
|
| pvenezia wrote: |
It would seem that the script called from Cacti isn't matching on the FQDN. Make sure they match, case sensitive. |
This is what's frustrating me I think. They ARE exact, no mismatches anywhere. |
|
| Back to top |
|
 |
shoe
Joined: 18 Apr 2007 Posts: 7
|
Posted: Thu Apr 19, 2007 9:30 am Post subject: |
|
|
| 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? |
Yes the poller is running
| Code: |
# ps aux | grep lm
root 7337 0.0 0.5 7068 2656 ? S Apr18 0:01 lmgrd-poller.pl: Sleeping...
root 16316 0.0 0.1 3884 660 pts/1 R+ 07:25 0:00 grep lm
|
If by "test" you mean
| Code: | | # perl ./lmgrd-query.pl test |
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. |
|
| Back to top |
|
 |
shoe
Joined: 18 Apr 2007 Posts: 7
|
Posted: Thu Apr 19, 2007 9:58 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
Brenner
Joined: 19 Apr 2007 Posts: 2
|
Posted: Thu Apr 19, 2007 10:05 am Post subject: |
|
|
Hello, first sorry for my poor english!
I have the problem that my Output on "perl ./lmgrd-query.pl test" is this:
| Quote: | [root@vr08 scripts]# perl ./lmgrd-query.pl test
Dumping hash...
$VAR1 = '127.0.0.1';
$VAR2 = {};
$VAR3 = 'vr08.vr';
$VAR4 = {};
$VAR5 = 'localhost';
$VAR6 = {}; |
In the lmgrd-poller.pl I have change to this, not more
| Quote: | my $lmutil = '/opt/flexlm/lmutil';
# Servers to poll, daemon name, and TCP port
my %licservers = (
'FQDN' => {
'27002' => {
'lizenz_humansolutions' => 'HumanSolution',
'lizenz_maya' => 'Maya',
'lizenz_vircinity' => 'Vircinity',
'lizenz_vrcom' => 'VRCom',
},
},
);
|
|
|
| Back to top |
|
 |
shoe
Joined: 18 Apr 2007 Posts: 7
|
Posted: Thu Apr 19, 2007 6:05 pm Post subject: |
|
|
| 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.  |
|
| Back to top |
|
 |
shoe
Joined: 18 Apr 2007 Posts: 7
|
Posted: Fri Apr 20, 2007 10:35 am Post subject: |
|
|
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.
I sitting back and watching my pretty graphs grow
 |
|
| Back to top |
|
 |
Brenner
Joined: 19 Apr 2007 Posts: 2
|
Posted: Mon Apr 23, 2007 6:52 am Post subject: |
|
|
| Brenner wrote: | Hello, first sorry for my poor english!
I have the problem that my Output on "perl ./lmgrd-query.pl test" is this:
| Quote: | [root@vr08 scripts]# perl ./lmgrd-query.pl test
Dumping hash...
$VAR1 = '127.0.0.1';
$VAR2 = {};
$VAR3 = 'vr08.vr';
$VAR4 = {};
$VAR5 = 'localhost';
$VAR6 = {}; |
In the lmgrd-poller.pl I have change to this, not more
| Quote: | my $lmutil = '/opt/flexlm/lmutil';
# Servers to poll, daemon name, and TCP port
my %licservers = (
'FQDN' => {
'27002' => {
'lizenz_humansolutions' => 'HumanSolution',
'lizenz_maya' => 'Maya',
'lizenz_vircinity' => 'Vircinity',
'lizenz_vrcom' => 'VRCom',
},
},
);
|
|
Nobody? Should I open a new thread?
Today I tried all the time, read perl script manuals and so on but nothing is better.
Can somebody give me a real lmgrd-query.pl with fake data. I can |
|
| Back to top |
|
 |
quorks987
Joined: 25 Apr 2007 Posts: 1
|
Posted: Wed Apr 25, 2007 8:46 am Post subject: |
|
|
[edited] ...
After spending a lot of time with this, I have no idea, how to get it work. The perl-Script returns right values... Data query debug returns:
| Code: |
+ 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  |
|
| Back to top |
|
 |
pvenezia
Joined: 13 Mar 2006 Posts: 20
|
Posted: Tue May 15, 2007 9:09 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
super-hornet Cacti User
Joined: 27 May 2007 Posts: 144
|
Posted: Wed Jun 06, 2007 7:30 am Post subject: |
|
|
Hi all
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.
SH |
|
| Back to top |
|
 |
Bucket10284
Joined: 06 Jun 2007 Posts: 1
|
Posted: Wed Jun 06, 2007 10:45 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|