Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to control a weblogic server.
I don't know much about it, but i need to check it with a plugin from Nagios (or something i made myself, but i don't have anything yet).
Here is some code a plugin uses
Code:
java weblogic.Admin -url t3://localhost:$PORT -username user -password pass
can someone explain what he does here? the port, does it has to be 8080 or 7001 or ..?
the weblogic admin server runs on 7101 bydefault if I recall with webapps on 7011. Either way, your config will show what ports are being listened for, or just run "netstat -plnt" to see what's there. You probably want to get more familiar with wlst if you want to do more in depth monitoring of weblogic, it's pretty neat.
#!/bin/sh
# set up WL_HOME, the root directory of your WebLogic installation
WL_HOME="/root/Oracle/Middleware/wlserver_10.3"
# Set JAVA_HOME to java virtual machine you want to run on server side.
JAVA_HOME="/usr/java/default/"
CLASSPATH="${WL_HOME}/server/lib/weblogic.jar"
export CLASSPATH
SERVICE="JVMRuntime"
FRASE="JVM VAP"
PORT=7001
java weblogic.Admin -url http://localhost:$PORT -username user -password pass
this is my output:
Code:
# ./file.sh
weblogic.Admin is a command-line utility for managing WebLogic Server. Try:
weblogic.Admin help LIFECYCLE Starting, stopping, discovering servers
weblogic.Admin help INFO Retrieving info about WebLogic Server
weblogic.Admin help JDBC Working with JDBC connection pools
weblogic.Admin help MBEAN Working with WebLogic Server MBeans
weblogic.Admin help CLUSTER Working with clusters
weblogic.Admin help ADMINCONFIG Managing Admin configuration
weblogic.Admin help ALL Help for all commands
Usage: java [<SSL trust options>] weblogic.Admin
[ [-url | -adminurl] [<protocol>://]<listen-address>:<port>]
-username <username> [-password <password>]
<COMMAND> <ARGUMENTS>
More info available at: http://e-docs.bea.com/wls/docsXX/admin_ref/cli.html
well nothing is listening on any weblogic ports, so I take it you didn't actually run netstat on the server itself??
as for wlst, just go google it. the internet is great.
Cna you clarify what you actually want as a solution to this thread? you're clearly confused about nagios and weblogic but what do you actually want to get out of this?
yes indeed, the netstat command was performed on the monitoring host (where nagios is installed on).
but the server where the weblogic is running on is a HP-UX server and the arguments doesn't supply to HP-UX.. so i tried it on the monitoring host
but anyways.. the wlst command will be searched on the internet after i post this
the main goal is that i can monitor the weblogic server with nagios. I know there are some plugins written and accessible on the exchange website, but i don't get this plugins to work. In my previous post , you see a part of the plugin which i edited to my needs, but still it doens't work (but maybe that's because i test this on the monitoring server... but the same here, because of the HP-UX server, some commands doesn't seem to work )
i'm following this link
and now i'm stuck at point 4
Quote:
Start the administration server by entering the following command at the WLST prompt. If necessary, replace the sample argument values with those that match your domain environment:
you need to liase with the weblogic admins. it is not professional or logical to not directly discuss requirements with the relevant people in your business, not least because if the people relevant aren't aware of the monitoring being attempted, they possibly don't want it anyway.
the people i work with asked me to write a script that checks the weblogic server, to see if it's accessible...
but i need to find out myself first, before i ask questions...
but i geuss nobody knows here the answer
the people i work with asked me to write a script that checks the weblogic server, to see if it's accessible...
but i need to find out myself first, before i ask questions...
but i geuss nobody knows here the answer
thx anyways
No that's not true. I'm very used to monitoring weblogic, but what you say there is probably more important than anything else so far. You HAVE spoken to them and they know what they have asked of you. From that point you should either 1) check tcp port availability and possible weblogic java jvm process access, along with standard OS stuff - disk space etc, or 2) discuss with them what their weblogic domains are, service accounts etc. In my experience they are NOT after in depth analysis of their app, and TBH it doesn't sound like you are maybe aware of what there is to monitor about it. Weblogic can be monitoring in thousands of different ways, and without you having this knowledge (well, moreover, the expectations to have it) then you should not believe it is your problem to achieve this goal.
I got "lumped" with weblogic as it was deemed "linux" as it ran on some redhat boxes. It's not linux, it's java and j2ee, and that is not what I do. I was bored though, and our systems sucked, so I worked out how to monitor weblogic message queues and the likes. But that was an extra, a bonus, and I wasn't expected to.
So rant over, just be aware of what should be expected. Being asked to do some "monitoring" is almost as bad as blaming "the network" for a fault. wtf does that mean?? don't read too much into a brief and only deliver what is actually wanted (unless you CAN provide more and want to get noticed)
i really have NO idea what a weblogic server do. I know i can surf to a website (the website of a weblogic server 8.1) and i can log on to that, and when i log on, i can see in what domain he is in.
I geuss that this server runs some kind of applications, and those are the one i need to monitor?!
Today or tomorrow , i have a meeting with the people who are guiding me, they give me first some time to search for myself, because when they give me the solution right away, i won't learn anything.
Quote:
1) check tcp port availability and possible weblogic java jvm process access, along with standard OS stuff - disk space etc
i don't want to be rude, but this says nothing to me. How can i check the tcp port availability and those weblogic java jvm process access??
I know a bit of Linux, but not everything, i'm still learning every single day
so if you can show me some commands which i can use to check those availabilities and access, maybe i'll can give you more information!!
P.S.: when i said nobody could help me here, wasn't meant on you personally, just in general (i haven't slept much the last couple of days, so i'm a little picky ) but i wasn't meant to be rude
java weblogic.Admin -url t3://localhost:$PORT -username user -password pass GET -pretty -type JVMRuntime >> /export/home/nagios/nagios/jvmvap.txt
This is what i'm using, and when i look in the file 'jvmvap.txt' i get this
Code:
Failed to connect to t3://localhost:7001: Destination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to destination
can you pls explain what's happening? i geuss i can check something of the weblogic server with the first command, but i can't get this to work
Well tcp and process checks are nothing special, and also please note, not in the slightest bit specific to Linux. The same applies to ANY Server, Windows included. what I said should mean just as much to a Windows sysadmin as a Linux one.
java weblogic.Admin -url t3://localhost:$PORT -username user -password pass GET -pretty -type JVMRuntime >> /export/home/nagios/nagios/jvmvap.txt
This is what i'm using, and when i look in the file 'jvmvap.txt' i get this
Code:
Failed to connect to t3://localhost:7001: Destination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to destination
can you pls explain what's happening? I guess I can check something of the weblogic server with the first command, but I can't get this to work
Don't run before you can walk, I *really* don't think you should be trying to go this deep into the environment form what I read. I would suggest that when you know for yourself what those errors mean, that's when it *may* be reasonable to try to do that sort of monitoring. I would guess there is actually nothing listening on 127.0.0.1:7001, but it could be other things - however I would expect that to be one of the significantly easier obstacles to overcome if you want to get into its guts.
Setup basic port and process monitoring, maybe a little http level interactions as a pretend user, and in your spare time play around and work out what else is possible.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.