I have a Nagios server with 10 servers monitored. I'm using hostgroups and NRPE to check Cpu and Disks.
But by default, check_disk command definition doesn't exist in the NRPE configuration file.
Is there any way to define these alias commands only on the Nagios Server ?
I would to avoid to change the NRPE config file on each server...
Thanks.
Nagios server connects to the monitored server via NRPE and execute the defined command in the remote nrpe.cfg file. So, the command must exist in the nrpe config file of the server to be monitored.
In the other hand, the list of the nrpe commands to be executed in the mentioned remote server is located under the nagios server: .../nagios/configurations/objects/server1.cfg
To summarize:
In Nagios server:
Define the command in the corresponding server's cfg file. (The name of the check, the servers/server groups to be checked etc.)
In Monitored server (for every individual server):
Add the command in nrpe.cfg. (Show the checker script's path and give parameters.)
Related
I am using PsExec to access two servers from my laptop. Access to one of the servers (running Windows 2008R2 Enterprise) works fine. Access to the other (Windows 2008R2 Standard) fails with an error (message below). My laptop has Windows 8.1.
Literature
I've verified that my systems match the requirements, as specified here
Investigating an earlier access denied, I followed the steps outlined here
Commands
Steps taken:
net use \\<servername>\Admin$ /user:me * succeeds
dir \\<servername>\Admin$ lists the remote directory, as expected
PsExec.exe \\<servername> -e cmd is very slow, and then fails with the message:
Error establishing communication with PsExec service on <servername>:
The system cannot find the file specified.
To the best of my knowledge (though I'm no Windows expert), I am in the administrator group on both the client and server machine.
Analysis 1
After executing the command, psexesvc.exe is still running on the remote machine, so the command at least partially succeeds
Before each invocation, I stop and delete the psexesvc service, and remove the executable manually
Analysis 2
I used wireshark to observe the communication between client and server. The following seems to happen:
File PSEXESVC.EXE gets successfully created and written
A "Bind" and a "Map" of SVCCTL
Delay of about 20 seconds (?)
Several SVCCTL calls (presumably resulting in the PSEXESVC service being created and started)
Named pipe PSEXESVC is opened and successfully written to
Named pipes for stdin, stdout and stderr cannot be found (STATUS_OBJECT_NAME_NOT_FOUND)
Trying to eliminate a permissions problem, I tried to verify that the named pipes actually don't exist, by running pipelist.exe (found here) on the server side. I did not actually see the pipes, but if they existed only for a very short time, I might not have run pipelist.exe frequently enough.
Version numbers
PsExec version 2.11
I am attempting to deploy a war file (Oracle's APEX Listener) to a GlassFish 3.1.2.2 server deployed on an RHEL server (I am also seeing the same issues on an Ubuntu server at home).
I used the following command to create the domain:
$GLASSFISH_HOME/bin/asadmin create-domain --portbase 8100 myDomain
[I am also creating multiple domains on the same GlassFish server (one GF instance with multiple domains) using values of 8200, 8300, and 8400 for the portbase value and using different domain names.]
I then start the domain using:
$GLASSFISH_HOME/bin/asadmin start-domain myDomain
Next, I attempt to deploy the APEX.WAR file using:
$GLASSFISH_HOME/bin/asadmin deploy --contextroot apex apex.war
But, I get the following error:
Remote server does not listen for requests on [localhost:4848]. Is the server up? Unable to get remote commands. Closest matching local
command(s):
help Command deploy failed.
I have also used the following commands with the same result:
$GLASSFISH_HOME/bin/asadmin deploy apex.war
$GLASSFISH_HOME/bin/asadmin deploy --target myDomain apex.war
$GLASSFISH_HOME/bin/asadmin deploy --target domain apex.war
And I get the same error each time.
I can deploy the file using the admin gui, but this is for a customer installation and I would really like to do as much as possible from the bash shell script I have created.
I am also installing the Java 1.7.0_45 JDK and modifying the $GLASSFISH_HOME/config/asenv.conf file to include AS_JAVA=
The error is actually correct because the admin port is 8148. But, how do I get GlassFish to "know" to use 8148 instead of 4848.
I have also tried this by:
$GLASSFISH_HOME/bin/asadmin create-domain --adminport 8148
--domainproperties http.ssl.port=8152
but this gets the same results as above.
Thanks for reading this tome of a post and any info on how to fix this would be greatly appreciated!
/dave
You can specify the port to which asadmin should connect as a parameter like this:
asadmin --port 4949 start-domain
If this isn't enough you can even specify the hostname with --host.
Have a look at the official documentation to see all possible parameters.
i get the same error ,you should do like this:
$GLASSFISH_HOME/bin/asadmin --port 8148 deploy apex.war
and input username and password the default user is admin and password is adminadmin
good luck for you!
In Windows Server 2008 R2, I can run JBoss successfully from the command line specifying options suchs as "-b 0.0.0.0". However, I want to run JBoss as a Windows service. I understand that I run /Path/To/JBoss/bin/service.bat install from the command line and this basically runs the start.bat whenever the computer starts. How do I configure the service to start with the command line arguments of -b 0.0.0.0?
Possible duplicate of How can I bind a JBoss AS 6 running as service to 0.0.0.0?
You could just hardcode -b 0.0.0.0 inside run.bat.
BTW, consider using Java Service Wrapper or YAJSW as RunJBossAsAServiceOnWindows wiki suggests. It allows to specify various service params in config.
I have a eclipse on windows 7 system and I am trying some code on it.
But as my database is on server that is not my local systems so how can I connect eclipse to remote server so that I can write code on local and run on server.
Is it possible then please let me know and that server to which I want to connect that is Linux server.
Do you have to run your program remotely just because your database resides on the other server? Most databases allow connecting over TCP/IP.
Otherwise my suggestion is to add you public ssh key on the server, and then create a script which copies your class files and then executes your java program on your server, such as:
scp -r classfolder remoteuser#remotesystem:folderpath
ssh remoteuser#remotesystem java -cp folderpath the.created.Program
The public key removes the need for you to enter your password for each command.
Can I remotely restart a PostgreSQL server throught PGAdmin ? The user I currently is the administrative privileges.
Regards,
Dino
I don't think there is such possibility. At best you can reload connected PostgreSQL server using pg_reload_conf() function:
pg_reload_conf sends a SIGHUP signal
to the server, causing configuration
files to be reloaded by all server
processes.
Command:
SELECT pg_reload_conf();
You can also install adminpack contrib module and reload server using Tools menu.
EDIT:
According to pgAdmin documentation:
If pgAdmin is running on a Windows
machine, it can control the postmaster
service if you have enough access
rights. Enter the name of the service.
In case of a remote server, it must be
prepended by the machine name (e.g.
PSE1\pgsql-8.0). pgAdmin will
automatically discover services
running on your local machine.
If pgAdmin is running on a Unix
machine, it can control processes
running on the local machine if you
have enough access rights. Enter a
full path and needed options to access
the pg_ctl program. When executing
service control functions, pgAdmin
will append status/start/stop keywords
to this. Example: sudo
/usr/local/pgsql/bin/pg_ctl -D
/data/pgsql
You can try use Start Service/Stop Service options (in Tools menu) to restart remote server.