Display current process-list from unix-agent #410

Merged
merged 2 commits into from Jan 17, 2015

Projects

None yet

2 participants

@f0o
Member
f0o commented Jan 15, 2015

#405
#407

Please merge #409 first

Added:
039.sql: create a new table processes
processes.inc.php: show all processes from given device including sort-options

Changed:
unix-agent.inc.php: insert all processes reported by check_mk_agent
device.inc.php: added tab with link to process-list

@f0o f0o Added:
	039.sql: create a new table processes
	processes.inc.php: show all processes from given device including sort-options

Changed:
	unix-agent.inc.php: insert all processes reported by check_mk_agent
	device.inc.php: added tab with link to process-list
42de118
@f0o f0o changed the title from Added: to Display current process-list from unix-agent Jan 15, 2015
@laf
Member
laf commented Jan 16, 2015

This looks good to me :)

Only real comment to make is the copyright notice mentions the alerts system so probably just a copy / paste error.

I'm just testing the new check_mk_agent to make sure it doesn't break anything then I think we are good to go.

@f0o
Member
f0o commented Jan 16, 2015

D'oh yeah it somehow went into my copyright template, will fix when home :)

@laf
Member
laf commented Jan 16, 2015

Just pulled this branch to test against current check_mk_agent to ensure backwards compatibility.

@laf
Member
laf commented Jan 16, 2015

Tested against old check_mk_agent all fine, checked against new all fine.

However I'm not getting processes listed, it fails to match on preg_replace, after this is run I still get this from $process:

(root,159048,8736,0.0) /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a

Rather than PIPE separated list.

@f0o
Member
f0o commented Jan 17, 2015

It isnt backwards compatible because the old version uses pcpu instead of cputime and also misses pid which they added in the middle of the data.. :/

Edit: pcpu is expressed usign a decimal notated number and cputime is in hh:mm:ss where hh can be arbitrary long
This is the key change that breaks backward compatibility

@laf
Member
laf commented Jan 17, 2015

Odd, I could have sworn I was testing with the latest check_mk_agent version when I was looking for processes in the mysql db.

Tried again this morning and it's working fine!! I'll merge this in now.

@laf laf merged commit 56596d0 into librenms:master Jan 17, 2015

1 check passed

Scrutinizer 5 new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment