Changing server name in WPS/WAS 7.5 - websphere

After federating the node from a WAS to another DMGR application, the server name was automatically changed to server1.
Is there any way to change it to, for example, server2?

Try this:
Create a new server template using your existing server configuration.
a. In Admin console, go to servers > Websphere Application Servers
b. Click on "Templates" > "New" and select your current server (eg:server1) and click "ok"
c. Name the template (eg: MyServerTemplate) and enter a short description. Click "Ok" and save the changes
Create new server using the template created in last step
a. In Admin console, go to servers > Websphere Application Servers
b. Click on "New", Enter the desired server name (eg: server2) and Click on "Next"
c. Select the new template name created in the last step (eg: MyServerTemplate) and click "Next"
d. Select "Generate Unique ports" (unless you need the default ports and know how to manage it)
e. Click Finish and Save the changes
Now you will have two servers with identical configurations. Validate the configs in the new server and delete the Old server with wrong name.

Related

Debug a file on virtual Vagrant box with Xdebug

I have a Vagrant virtual machine, with a website running on it, on my MacBook.
I would like to inspect what is in a variable called $logs. I have set the cookie in my browser using the Chrome extension, and I am listening for PHP debug connections, and I have set a breakpoint. If I select the 'Run' menu and click 'Debug sitelog.module', I get some errors.
I'm not sure how to configure this? My ultimate goal is to inspect the contents of $logs. Thanks.
I do not use cookies anymore for debugging as I found easier to debug by enabling remote debugging in xdebug.
In any case I suggest that you first create a PHP Web application and define a Server for that web application. To do this:
With the Navigation bar visible (View | Navigation Bar), the available run/debug configurations are displayed in the run/debug configuration selector in the Run area.
In the Run/Debug Configuration dialog box, click + (add) on the toolbar. The drop-down list shows the default run/debug configurations. Select the desired configuration type (ie: PHP Web Application).
Set up a server for this configuration by clicking on the ... icon next to the Server dropdown.
On the Servers configuration, fill in the name, host and port and check the Use path mappings checkbox.
Define your path mapping, by selecting on the left side (your host machine) the desired path and then providing the path to the same location in your guest (press enter on the input field once you define the path for the guest machine).
With this you should be able to debug using the XDEBUG cookie. If you would like to try the remote debugging option (which IMO is much simpler) then add this to your xdebug.ini
zend_extension=xdebug.so
xdebug.auto_trace="0"
xdebug.trace_output_dir="/vagrant"
xdebug.trace_output_name="trace.%c"
xdebug.trace_format="2"
xdebug.trace_options="0"
xdebug.collect_includes="1"
xdebug.collect_params="0"
xdebug.collect_return="0"
xdebug.collect_vars="0"
xdebug.default_enable="1"
xdebug.extended_info="1"
xdebug.manual_url="http://www.php.net"
xdebug.max_nesting_level="256"
xdebug.show_error_trace="0"
xdebug.show_exception_trace="0"
xdebug.show_local_vars="0"
xdebug.show_mem_delta="1"
xdebug.dump.COOKIE="NULL"
xdebug.dump.ENV="NULL"
xdebug.dump.FILES="NULL"
xdebug.dump.GET="NULL"
xdebug.dump.POST="NULL"
xdebug.dump.REQUEST="NULL"
xdebug.dump.SERVER="NULL"
xdebug.dump.SESSION="NULL"
xdebug.dump_globals="1"
xdebug.dump_once="1"
xdebug.dump_undefined="0"
xdebug.overload_var_dump="2"
xdebug.profiler_enable="0"
xdebug.profiler_output_dir="/vagrant"
xdebug.profiler_output_name="cachegrind.out.%p"
xdebug.profiler_enable_trigger="0"
xdebug.profiler_append="0"
xdebug.profiler_aggregate="0"
xdebug.remote_enable="1"
xdebug.remote_handler="dbgp"
xdebug.remote_host="192.168.33.1"
xdebug.remote_mode="req"
xdebug.remote_port="9000"
xdebug.remote_autostart="1"
xdebug.remote_log=""
xdebug.idekey=""
xdebug.var_display_max_data="512"
xdebug.var_display_max_depth="2"
xdebug.var_display_max_children="128"
Make sure you adjust the remote_host ip if needed. Once you save this changes to your xdebug.ini, all you need to do to start debugging is to enable the Start listening for PHP Debug Connections icon (looks like a telephone).
Reference:
How to set up Run/Debug Configurations

icinga web 2 dashboard showing specific servicegroups

I've succesfully set up my icinga2 services and addded them to two several ServiceGroups inside the same host.
Is it possible to create an icinga2web dashboard showing only those serviegroups (inside the same host) which contain at least a service with a critical state?
Thus far I can only get a list of all servicegroups inside the host test sorted by severity:
/icinga-web2/monitoring/list/servicegroups?host=test&sort=services_severity
Seems that the list of ServiceGroups is not capable of accessing service states or using filters in any way :S
Don't even know where to look in the icinga2 documentation concerning dashboarding in icinga web 2. Help would be greatly appreciated :)
You can customize your dashboard,
goto
Dashboard>Add Dashlet
click Dashboard in right-side tabs one v symbol is there, on mouse hover you will get that Add Dashlet option!
Enter url like
monitoring/list/servicegrid
Dashlet Title
As your wish
And click Add to Dashboard button, now you got all services with some box, it will show all services!!

Checkbox to toggle Application Insights Diagnostics on a Worker Role in VS2015 not toggling

I was following this tutorial so I could add Diagnostics to my worker role. I followed all the steps but when I get up to Step 1 of the "Azure Diagnostics" section, I can see the "Send Diagnostics data to Application Insights" checkbox there, but I am unable to select it.
When I click on it, it doesn't toggle, stays unchecked.
What may cause this to occur? Are there any steps specific to Worker Roles to get this working that Web Roles didn't need?
If you don't see the "Send diagnostics data to Application Insights" dialog when you click the Checkbox (which sounds like a bug, I'm wondering if this is happening to all of your worker role projects even with newly created ones), you can still manually edit the configuration files to achieve the same thing.
First go to the Settings tab in the role properties page and add a new setting item named "APPINSIGHTS_INSTRUMENTATIONKEY". The "Type" of the setting should be "String". The "Value" of the setting should be the instrumentation key of your target Application Insights resource. You can find it on the Azure portal by selecting the resource and then go to its Settings -> Properties blade.
Then open the "diagnostics.wadcfgx" file under your worker role in Solution Explorer. From there add an attribute "sinks" with value "applicationInsights.errors" to the "DiagnosticsMonitorConfiguration" element. The element should then looks like this:
<DiagnosticMonitorConfiguration overallQuotaInMB="4096" sinks="applicationInsights.errors">
In the same file, add the following section under the WadCfg element:
<SinksConfig>
<Sink name="applicationInsights">
<ApplicationInsights />
<Channels>
<Channel logLevel="Error" name="errors" />
</Channels>
</Sink>
</SinksConfig>
So, it turns out that I needed to put the instrumentation key in both the Cloud and Local service configurations. I had only had it on cloud as I thought I would only be using the diagnostics on cloud deployments.

How to hide TeamCity configuration for selected users?

I have one TeamCity project Dac.Test that contains 3 configurations: DEV, QA, PROD.
Also I have some users associated with their Roles. Is this possible to hide / show certains configurations for selected users or groups?
For example: Users associated with group: Testers can see QA configuration, but not PROD and DEV.
There is no way of managing user permissions per-build, this is available on a project level only. You could create a sub-project in the Dac.Test project to cater for this
If you're looking for a way of stopping people from mistakenly running this build, the following approach will work.
This method uses a prompt box that will pop up after you click the run button, it also needs input from the user confirming that they mean to run the build.
No one can run this build by accident
Go to your build configuration in the TeamCity UI
From here, go to Edit Configuration Settings --> Parameters --> Add new parameter
Enter something like 'Confirmation' as the parameter name
Then beside 'Spec:', click the 'Edit...' button
Set up the parameter as shown in the following screenshot:
You will now be prompted and asked for confirmation when you click the run button. The user will have to enter 'YES' in the prompt box that appears, any other value will stop the user from building:
This is best accomplished by using TeamCity's built-in role management. Roles allow you to set fine-grained permissions for users and groups. One potential issue, however, is that roles are scoped to projects (not build configurations). You'll need to create a separate Dac.Test QA project+configuration and provide your Testers the necessary privileges there. You'll also need to make sure that they are stripped of all privileges for the Dac.Test project.

EF switching from one db to another .edmx settings how to?

I have an mvc3/EF4.1 model that has an .edmx bound to a Db locally. I have to move this model to Database to another server.
Q: What steps do I need to make so that when I right click on the .edmx and "Update Model/Database" that it selects and picks up that same model but on the new server? Thx!
Open your web.config and look at your block. The connection information to the server is listed in there. Simply change it to the new server.
The full format is listed here:
http://msdn.microsoft.com/en-us/library/cc716756.aspx
If the new server is using the same authentication, just change the server name (the 'Data Source=localhost' section) to be your new server name.

Resources