LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-24-2015, 08:19 AM   #1
Rohant
Member
 
Registered: Oct 2011
Location: India, Mumbai
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44

Rep: Reputation: Disabled
OCS Inventory IP Address of Clients shows Blank on Web Page


Hi All,

I have posted this query on OCS site but didnt get reply. so i thought some might have face this issue & guide me thats why i posted my query here.

I have setup OCS Inventory server 2.1 on Centos server 6.5 64bit OS. All the details is coming to my OCS server properly except IP Address of Client Machines.

Majority of my client is running with ocsinventory-agent-2.1.1-1. below is my configuration file (Client side) ocsinventory-agent.cfg.

#################

# Server URL, unconmment if needed
server=http://10.0.0.218:8082/ocsinventory
basevardir = /var/lib/ocsinventory-agent

# Administrative TAG (optional, must be filed before first inventory)
tag = Server

# How to log, can be File,Stderr,Syslog
logger = Stderr
logfile = /var/log/ocsinventory-agent/ocsinventory-agent.log

#################

Currently i am monitoring three subnet as mentioned below.

OCS_SERVER_IP = 10.0.0.218 (Inside DMZ)

1st subnet = 10.0.0.0 (Inside DMZ)

2nd subnet = 10.0.1.0 (Inside DMZ)

3rd subnet = 10.0.5.0 (Inside DMZ)

4th subnet = 192.168.1.0 (Outside DMZ)

When i execute manually "/usr/sbin/ocsinventory-agent" command the IP address of server gets displayed in "IP address" column. but after some time when other servers sends their inventory the ip addresses of earlier servers gets vanished from the column. it keeps vanished until i execute "/usr/sbin/ocsinventory-agent" command manually.

I have manually set a cronjobs for every 6 hours on clients to send inventory to server. when those crons gets runs even at that time IP address column shows blank but i can see in "Last inventory" column that inventory is just now.

Please guide me on the issue as i have tried almost all things but unable to find issue.

Attached is my Client side debug log file is very big.

If some had faced this issue or have some guidance please let me know.

Thanks in Advance...
Attached Files
File Type: txt ocsinventory-agent_log_part1.txt (240.9 KB, 150 views)
File Type: txt ocsinventory-agent_log_part2.txt (191.5 KB, 91 views)
 
Old 04-08-2015, 09:11 AM   #2
carlwilson
LQ Newbie
 
Registered: Jan 2004
Posts: 9

Rep: Reputation: Disabled
I had the same problem and stumbled across your question whilst looking for an answer.

I did a bit more research. The answer is simple: the cron job doesn't know the path to ifconfig (usual problem with cron jobs). Solution is to enter the cron job as:

* */3 * * * . /etc/profile; /usr/local/bin/ocsinventory-agent > /dev/null 2 >&1


You can check this by running ocsinventory-agent --local=/tmp from the command line and then as the cron job.

From the command line (which has the correct path) you get the correct content; from the cron job (without the path) you get a blank <NETWORKS> section.
 
1 members found this post helpful.
Old 04-29-2015, 02:23 AM   #3
Rohant
Member
 
Registered: Oct 2011
Location: India, Mumbai
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44

Original Poster
Rep: Reputation: Disabled
Thanks carlwilson for your info. it solved my issue.

However when i ran "* */3 * * * . /etc/profile; /usr/local/bin/ocsinventory-agent > /dev/null 2 >&1" from cron it didnt worked. but when i ran ". /etc/profile; /usr/local/bin/ocsinventory-agent > /dev/null 2 >&1" from shell script it worked. so i am running that shell script from cron now.

Still not figured out why its not woking from cron directly.

Thanks once again for your Info.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OCS Inventory NG aocferreira Linux - Networking 0 05-16-2011 09:51 AM
LXer: GLPI - a great add-on to OCS Inventory LXer Syndicated Linux News 0 09-20-2006 05:21 PM
LXer: Howto install OCS Inventory NG LXer Syndicated Linux News 0 08-29-2006 01:54 PM
httpd problems - blank web page shows up when access from outside of internet LAN wk4997 Linux - Networking 2 01-21-2006 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration