question

Dmytro Rastoropov avatar image
Dmytro Rastoropov asked

Run Filebeat with PowerShell as administrator

Hi PlayFab! :)

We are going to use Filebeat (https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html) service to get logs from the server (Photon). We created a PowerShell script to setup and run Filebeat (https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html) as a windows service, but the script execution requires administrator rights.

Questions:

  1. How can we run a Power Shell script as administrator without a connecting by RDP and running it manually?
  2. Is it possible to get windows server administrator credentials to run it during deploy?
Thanks in advance!,

Hi PlayFab! :)

We are going to use Filebeat (https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html) service to get logs from the server (Photon). We created a PowerShell script to setup and run Filebeat (https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html) as a windows service, but the script execution requires administrator rights.

Questions:

1. How can we run a Power Shell script as administrator without a connecting by RDP and running it manually?

2. Is it possible to get windows server administrator credentials to run it during deploy?

Thanks in advance!

windows
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Photon is not a PlayFab service - it's a service provided by Exit Games (https://www.photonengine.com/). We provide an integration in our Add-ons marketplace, to allow you to easily integrate your Photon usage with your PlayFab game. You'd need to talk to the Exit Games team directly to determine whether Filebeat is compatible with their service, and how to use it if it is.

7 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dmytro Rastoropov avatar image Dmytro Rastoropov commented ·

Thanks for response :)

0 Likes 0 ·
Dmytro Rastoropov avatar image Dmytro Rastoropov commented ·

Hi!
We investigated an issue deeper and another question appear.
We run PowerShell scripts through Shim (.NET console Application). It ran successfully on the PlayFab server. But when we tried to check Filebeat service with a Power Shell “service filebeat” we got a response “service: Cannot find any service with service name ‘filebeat’” and there is no installed filebeat service on the PlayFab server. When we connecting to a virtual machine with RDP and run PowerShell scripts manually than service installed successfully. But we want to run them automatically with our Shim application. It is a part of our CI/CD process. Our PowerShell scripts and logs from it in the attachments.zip.

Is it possible to install custom services on the PlayFab virtual machines from the Shim?

Thanks in advance!

attachments.zip

0 Likes 0 ·
attachments.zip (1.6 KiB)
brendan avatar image brendan Dmytro Rastoropov commented ·

If I'm interpreting your question correctly, you are currently uploading a build into our multiplayer server hosting, in order to use it to run a PowerShell script through Shim. Is that correct? Going that route, you would need to package any components you need that are not part of the base server in your build.

0 Likes 0 ·
Dmytro Rastoropov avatar image Dmytro Rastoropov brendan commented ·

Hi, thanks for your reply.

Yes, it is correct.

During the deploy, we package Shim, Filebeat, and our PowerShell scripts to zip archive and publish it to your multiplayer server hosting.

Shim is a .NET console application, that runs PowerShell scripts (one of them is for installing Filebeat as a windows service and the second one is for starting installed service).

After Shim is completed in our logs we can see that PowerShell scripts completed correctly. But when we try to check Filebeat service on the multiplayer service (using RDP connection) we cannot find it and there is no Filebeat service installed on the multiplayer server.

Could You please give us an advice is it possible to install new windows services on the multiplayer server?

If it is possible, are there any logs of your multiplayer server hosting to check what is going on with the windows services?

Thanks in advance!

0 Likes 0 ·
Show more comments
Dmytro Rastoropov avatar image Dmytro Rastoropov commented ·

@Brendan Sorry for troubling, any updates?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.