[SOLVED] OCS Inventory IP Address of Clients shows Blank on Web Page
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44
Rep:
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.
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:
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.
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.