Jump to content


Configuring "Perforce Service Manager" aka "psm"

insights psm

  • Please log in to reply
3 replies to this topic

#1 Bruce Mc

Bruce Mc

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts
  • LocationSeattle Area

Posted 24 April 2014 - 12:10 AM

Hi,

I've setup an Insights server on a VM and I'm wanting to have it display data from an instance of psm on a perforce server we use for trying out new things.

Our test p4d server is an older server that has Centos 5.0 installed. After a bit of hoop jumping to get the correct version of ruby installed, running down dependencies on libyaml, ruby-irb, & ruby-rdoc, I've made it to a point where I can install and start psm.

When I start psm, I'm seeing text like this,
Perforce service manager version 2013.3.759718.beta
Loading configuration from /psm/config.yml
Starting structured log monitoring for main
Starting webapp on port 4440
Database is /psm/monitordb.sqlite..., rotated DAILY
Logging to /var/local/log/psm/
== Sinatra/1.3.3 has taken the stage on 4440 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4440, CTRL+C to stop

My config.yml looks like this,
servers:
 main:
  structured_log_location: /p4logdir/beta/

I'm pretty sure the ip:port in the line "Listening on 0.0.0.0:4440, CTRL+C to stop" is not right but the information on Insights' psm web page "h t t p : / / p4vm-insights:8080/insights/docs/psm" is pretty sparse.

I've confirmed that port 4440 for is not accessible externally and the firewall is not getting in the way.

Any ideas on what needs to be done to get this puppy going?


On some different topics...

If I were to configure my p4d server to put its structured logs on an NFS share, would I be able to setup the psm instance on a different machine, accessing the structured logs from that share?

The config.yml file seems to suggest that I could have more than one server being monitored, if so, would I be able to setup an additional configuration for a replica server, reading the structured logs from a different NFS share? If so, what other server types could be used?

For the continuous import, is Insights reading the journal in a similiar fashion to how a replica server reads the journal? Specifically, I am wondering about the process of how Insights behaves when my primary server rotates it journal. Does it read the p4d server's journalPrefix so that it can backtrack into the rotated journal?

Thanks,

Bruce

#2 P4Martin

P4Martin

    Member

  • Staff
  • 21 posts
  • LocationUK

Posted 24 April 2014 - 09:09 AM

Hi Bruce,

A couple of thoughts and suggestions for you.

Have you run "netstat -nl" on the host to see exactly what port PSM is listening on (0.0.0.0 means it's listening on all interfaces, so it doesn't seem wrong to us).

Another thing to try from the system itself, and from off the system, is to access http://<centosSystem>:4440 using a web browser or program such as wget or curl.  This is a simple webpage served up by PSM that should display some basic stats.  If this is accessible from on the box, but not off it, you may want to double check firewalls. If it's not accessible from on the box itself then please open a support ticket and we can help to debug your issue in more detail.

On your other topics:

- Configuring PSM to read from an NFS share should not be a problem.
- The config.yml is structured that way, but multiple servers are not yet supported unfortunately.
- Continuous import does indeed behave very much like a replica in the way it reads the journal using prefix and offset.  It copes with journals being rotated and will be able to 'catch up' in the same way that a replica would.

Hope this helps!

Martin.

#3 Bruce Mc

Bruce Mc

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts
  • LocationSeattle Area

Posted 25 April 2014 - 05:52 PM

Martin,

Thanks for the information and assistance. The connectivity issue did indeed turn out to be the firewall despite my revisiting it a few times before posting. Time for more study on the nuances of iptables, I suppose. :huh:

Thanks,

Bruce

#4 P4Martin

P4Martin

    Member

  • Staff
  • 21 posts
  • LocationUK

Posted 28 April 2014 - 08:22 AM

Glad you've tracked it down Bruce, don't hesitate to shout if there's anything else we can help with!

Martin.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users