I have a HPE G7 and Zabbix v6, So I want to monitor this server on zabbix I fill the snmp data on iLO, but I get No Snmp Data Collection on Zabbix!
I try to fill snmp data on iLO!It happens on HPE-G7!
Do you have any way to solve this problem!?
There are many possible causes for this issue:
ILO SNMP settings: double-check that the SNMP settings on your ILO are configured correctly and match the settings in Zabbix.
Firewall issues: Ensure that any firewall between Zabbix and ILO allows traffic on SNMP port (UDP/161 by default).
Incorrect SNMP version: make sure that the SNMP version you are using in Zabbix is compatible with SNMPv2c.
Timeout issues: If the SNMP data collection takes too long, the request may time out.
Verify if the SNMP service is running on the HPE G7 server, if not start it.
To test SNMP connectivity from the Zabbix server to the HPE G7 server, you can use the nmap and snmpwalk commands.
nmap -sU -p 161 <HPE G7 server's IP address>
The SNMP port should be open, not open|filtered, in the nmap output.
snmpwalk -v 2c -c <community string> <HPE G7 server's IP address> | head
If working, the snmpwalk command will show a bunch of SNMP metrics. When not working, it usually shows a timeout error.
Related
I installed Nagios to my local server, and am monitoring a CentOS server.
All the plugins (nagios plugins and nrpe) are installed too, and working in local, but not via my server. Generic services are monitored well but others (local services) aren't working. Statut information shows: CHECK_NRPE STATE CRITICAL: Socket timeout after 30 seconds.
I've installed nrpe in my remote host and added commands in nrpe.cfg.
In my nagios server, I defined those commands in my server's configuration file.
When I check those commands in my centOS server, it works well.
For exemple when I type:
./check_procs -w 250 -c 300
prompt shows:
PROCS AVERTISSEMENT: 284 processus | procs=284;250;300;0;
Or the command: ./check_nrpe -H localhost
It shows: NRPE v3.2.1
Everything seems working, but if I try: ./check_nrpe -H monitoredserver, it doesn't work.
Also, in nagios web interface, every local service in monitored server shows: CHECK_NRPE STATE CRITICAL: Socket timeout after 30 seconds.
Please verify common mistakes which you can have:
Your NRPE daemon is not started on remote server
Run service nrpe status on remote server and verify NRPE state.
Test your network connection
Run telnet monitoredserver 5666 from Nagios server and test your connection. If this command fail, then you have firewall between these servers.
I am using mongo 3.0.8. I have an authenticated user admin with password admin. I am able to connect to the mongo shell as follows.
mongo admin -u amdin -p amdin
However, i tried to connect to using the following C code. This gives me an error
WARNING: client: Failed to connect to: ipv4 127.0.0.1:27017,
error: 111, Connection refused
char URI[256];
snprintf(URI,256,"mongodb://admin:admin#127.0.0.1:27017/?authSource=admin");
mongoc_client_t *client = mongoc_client_new(URI);
The error error: 111, Connection refused is a networking error.
Your URI expecting to find the server listening on port 27017 of the same machine (127.0.0.1). Possible issues:
Server not running
Server not on that port
Server is bound to the "real ip address" of the machine.
There is local firewall (e.g. iptables) blocking access
Maybe an SELinux problem?
If this is a Linux box, these commands might help diagnose:
netstat -an -A inet | grep LISTEN
/sbin/iptables -L
I have an Apache2 Ubuntu Server that is running and want to replicate my couchDB database locally to remote on the server. With terminal curl from this documentation on how to replicate. I performed this:
curl -X POST -d '{"source":"http://127.0.0.1:5984/demo","http://server_IP_here/":"demo"}' \http://127.0.0.1:5984/_replicate
The error comes up everytime. Is there something wrong with the above statement?
The server IP has doesn't require ports as a side not.
curl: (7) Failed to connect to 127.0.0.1 port 5984: Connection refused
Try to use port 8092
I couldn't found documentation on this, though random trying different ports found that my couchbase instance answer there :)
Given an IP Address and port number, is it possible to check if the machine with that IP address has Postgresql listening on the specified port? If so, how?
I just want to obtain a boolean value of whether Postgresql is listening on the specified port of the specified machine.
You can use, for example, nmap tool:
=$ sudo nmap -v -p 5930 127.0.0.1
Starting Nmap 6.00 ( http://nmap.org ) at 2013-06-25 19:28 CEST
Initiating SYN Stealth Scan at 19:28
Scanning localhost (127.0.0.1) [1 port]
Discovered open port 5930/tcp on 127.0.0.1
Completed SYN Stealth Scan at 19:28, 0.03s elapsed (1 total ports)
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000045s latency).
PORT STATE SERVICE
5930/tcp open unknown
Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds
Raw packets sent: 1 (44B) | Rcvd: 2 (88B)
Alternatively you can just "SELECT 1" with psql, and check output:
=$ psql -h 127.0.0.1 -p 5930 -c "select 1"
?column?
----------
1
(1 row)
=$ psql -h 127.0.0.1 -p 5940 -c "select 1"
psql: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5940?
I think you need to define what you're trying to achieve better. Do you just want to know if anything is listening on a certain point? If PostgreSQL is listening on a given port? If PostgreSQL is running and actually accepting connections? If you can connect to PostgreSQL, authenticate successfully and issue queries?
One option is to invoke psql to connect to it and check the result code. Do not attempt to parse the output text, since that's subject to translation into different languages.
Better, use the client library for the language of your choice - psycopg2 for Python, PgJDBC for Java, the Pg gem for Ruby, DBD::Pg for Perl, nPgSQL for C#, etc. This is the approach I'd recommend. The SQLSTATE or exception details from any connection error will tell you more about why the connection failed - you'll be able to tell the difference between the server not listening, authentication failure, etc this way. For example, in Python:
import psycopg2
try:
conn = psycopg2.connect("host=localhost dbname=postgres")
conn.close()
except psycopg2.OperationalError as ex:
print("Connection failed: {0}".format(ex))
There are exception details in ex.pgcode (the SQLSTATE) to tell you more about errors that're generated server-side, like authentication failures; it'll be empty for client-side errors.
If you just want to see if something is listening on a given IP and TCP port, you can use netcat (*nix only), or a simple script in the language of your choice that creates a socket and does a connect() then closes the socket if it gets a successful response. For example, the following trivial Python script:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect(('localhost',5432))
s.close()
except socket.error as ex:
print("Connection failed with errno {0}: {1}".format(ex.errno, ex.strerror))
The same approach applies in any programming language, just the details of the socket library and error handling vary.
For some purposes it can also be useful to use the netstat tool to passively list which processes are listening on which network sockets. The built-in netstat on Windows is pretty brain-dead so you have to do more parsing of the output than with netstat for other platforms, but it'll still do the job. The presence of a socket in netstat doesn't mean that connecting to it will succeed, though; if the process has failed in some way that leaves it broken but still running (stuck in an infinite loop, blocked by a debugger, SIGSTOPed, etc) then it won't respond to an actual connection attempt.
In brief
In details
Fastest way is to use netcat aka nc with timeout ability as shared here
Results as 0/1 means postgres working/not-working
echo 'QUIT' | nc -w SECONDS YOUR_HOST PORT; echo $?
# eg
echo 'QUIT' | nc -w 1 localhost 5432; echo $?
Another also-faster way that works for me is to use telnet as discussed here.
echo -e '\x1dclose\x0d' | telnet YOUR_HOST PORT
# eg
echo -e '\x1dclose\x0d' | telnet localhost 5432
i have got a new Linux Server (Debian 6.0) with a Database (MySQL) which is accessed by Port 3306 like as usual.
Now I'd like to access the database due port problems of some users (because port 3306 is often blocked by network firewalls) by port 80 or 443. So the transfer must be redirected from Port 80 to 3306 to keep the Database working.
I have tried following command:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3306
but I got following error:
iptables: No chain/target/match by that name.
Does anyone can help me solve this problem? The NAT table is empty (PREROUTING,POSTROUTING,OUTPUT have no entries) (checked with iptables -t nat -n -L)
In iptables Kernel modules required for NAT functionality:
Run following command to load modules in kernel:
# modprobe iptable_nat
# modprobe ipt_REDIRECT
Make sure you have above modules compiled in kernel:
[root#instructor tmp]# grep REDIRECT /boot/config-$( uname -r )
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_BRIDGE_EBT_REDIRECT=m
In VPS Server:
Enable modules on host server using modprobe command
Execute following command from the host server to enable all the modules for the VPS
vzctl set VEID --iptables iptable_nat --iptables ipt_REDIRECT
Add rules in file /etc/vz/conf/veid.conf
IPTABLES="iptable_nat ipt_REDIRECT"