/build/static/layout/Breadcrumb_cap_w.png

NXLogs install

Hi All!

I'm trying to install NXLogs with a specific config file (.conf). After the install I need to restart the service for the new config to take effect. NXLog is in the software catalog but I'm not sure how to force it to overwrite the default config.

Maybe a script would be better. Zip the msi and the .conf and run the batch file to restart the service after. It seems doable but I don't have much experience with Kace to implement this.


0 Comments   [ + ] Show comments

Answers (3)

Posted by: Nico_K 4 years ago
Red Belt
0

Go to Distribution |Task Chains to combine the tasks.

Build your deployment (and for specific questions it may be useful to ask how to install via Command line the software with your needs) and a restart task and put both into the task chain.


Comments:
  • Thanks for the quick reply Nico.

    I'm not really following. Can you expend on this please? - mr.mister 4 years ago
  • I think I understand. I can create a task to restart a service and task it after the install.

    As far as the install, how would I force the overwrite of a file in a directory with the one that I want? - mr.mister 4 years ago
    • there are multiple ways, a good idea may be (as I said: I dont know the software)
      1. you create an installation as a managed install
      2. you create a file sync or a script which copies the files to the location you want
      3. you create a script which restarts the service

      you put them all in the Task chain so they are running one after the other. - Nico_K 4 years ago
      • OK. How would I copy the file. I don't want to put in on share for the script to pickup. I want the file to be copied from a Kace directory. Are there variables to specify it.

        e.g. a bat file with something like this:

        copy /z /y “$KaceVar\nxlog.conf" "C:\Program Files (x86)\nxlog\conf" - mr.mister 4 years ago
      • yes, you can find all usable variables if you click to the mario blocks (the blue boxes with the question marks) - Nico_K 4 years ago
  • I'm having a problem with the script. The scripts runs successfully. I can see everything is being copied but the file never gets overwritten.

    in online shell with .bat

    start /wait xcopy /Y $(KACE_DEPENDENCY_DIR)\nxlog.conf "C:\Program Files (x86)\nxlog\conf\"
    net stop nxlog
    net start nxlog

    I tried with "" and without. No luck - mr.mister 4 years ago
Posted by: KevinG 4 years ago
Red Belt
0

For just copying a file to an end point, you can use the "File Sync" feature of the SMA.

More information can be found in the Admin guide.

Posted by: vigasi 4 years ago
Senior White Belt
0

Hello, 

For this installation i created 3 scripts:

1- Script to install the agent  (i used the msi configuration)

2a - script to overwrite the nxlog.conf file  (zipped the file/ attached it and the script unzips the file and places it C:\program.........) (((this conf is for DC servers)))

2b - script to overwrite the nxlog.conf file  (zipped the file/ attached it and the script unzips the file and places it C:\program.........) (((this conf is for IIS servers)))

3- Start & Restart service (nxlog)  (script to start service also to restart it/ just in case :) )


Once those 3 scripts were tested, i created a task Chain

1- task chain to run 1, 2a, 3

2- task chain to run 1, 2b, 3


Example of Step 1:

0CZna1N9pivAAAAAElFTkSuQmCC

Example of step 2a

Dependencies  Tasks (required)

Task 1trashcan-icon.png

Attempts: 
On Failure:  Break  Continue

Verify

  1. Verify that the file “C:\Program Files (x86)\nxlog\conf\nxlog.conf” exists.
    trashcan-icon.png

On Success

  1. Unzip “$(KACE_DEPENDENCY_DIR)\nxlogIIS&regular.zip” to “C:\Program Files (x86)\nxlog\conf”.
    trashcan-icon.png

Example of Step 3:

Verify

  1. Verify the service “nxlog” exists.
    trashcan-icon.png

On Success

  1. Start service “nxlog”.
    trashcan-icon.png
  2. Restart service “nxlog”.
    trashcan-icon.png
  3. Log “started....” to “status”.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ