Hello good afternoon, you can implement everything without problems but with rh5 and 6 I can not make it work
PROBLEM: njmon starts but ends in a few minutes without registering anything in the base, this happens when client is redhat 5 and 6, I try to change to injector.py_v15 but I join the problem with redhat 7 :(
Injector: injector.py_v14
Collector: njmon_collector_v16
njmon: test version 18,19,21
Injected snapshot 0 for localhost Database:njmon
INFO: Starting injectori part1:/aplicaciones/njmoninfluxdb/injector.py:9354
INFO: Starting injectori part2:port:8282
INFO: not opening the JSON output file as requested:preamble-here njmon serverclient 2019-03-25T19:28:33 xxxxxxxxx 12 postamble-here:-1
INFO: Finished loops:serverclient:4
/usr/lbin/njmon -s60 -c1440 -p 8282 -i srvnjmon01 -X xxxxxxxxx -d
get_hostname called line 208
create_socket called line 179
socket: trying to connect to 192.168.1.10:8282
hello string="preamble-here njmon serverclient 2019-03-25T19:30:38 xxxxxxxxx 12 postamble-here"
forking for daemon making if debug=1 === 0
child running
proc_stat called line 931
proc_diskstats called line 1092
proc_net_dev called line 1279
gpfs_init called line 659
date_time called line 471
pstring(datetime,2019-03-25T16:31:38) count=109
pstring(UTC,2019-03-25T19:31:38) count=155
plong(snapshot_seconds,60) count=195
plong(snapshot_maxloops,1440) count=238
plong(snapshot_loop,0) count=274
identity called line 1737
get_hostname called line 208
pstring(hostname,serverclient) count=353
pstring(shorthostname,serverclient) count=399
pstring(fullhostname1,serverclient.ar.bsch) count=453
pstring(lo_IP4,127.0.0.1) count=492
pstring(eth0_IP4,192.168.1.10) count=538
pstring(lo_IP6,::1) count=571
pstring(eth0_IP6,fe80::250:56ff:fe82:5f) count=625
pstring(njmon_command,/usr/lbin/njmon) count=677
pstring(njmon_version,20@13/03/2019) count=727
pstring(username,root) count=763
plong(userid,0) count=792
etc_os_release called line 1390
proc_version called line 1425
pstring(version,Linux version 2.6.18-409.el5 (mockbuild@x86-031.build.eng.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-55)) #1 SMP Fri Feb 12 06:37:28 EST 2016) count=1022
lscpu called line 1450
sh: /usr/bin/lscpu: No such file or directory
proc_stat called line 931
pdouble(user,0.7) count=1164
pdouble(nice,0.0) count=1200
pdouble(sys,0.2) count=1235
pdouble(idle,98.1) count=1272
pdouble(iowait,0.0) count=1310
pdouble(hardirq,0.0) count=1349
pdouble(softirq,0.1) count=1388
pdouble(steal,0.0) count=1425
pdouble(guest,271394308096.0) count=1473
pdouble(guestnice,30691716038131712.0) count=1530
pdouble(user,0.6) count=1620
pdouble(nice,0.0) count=1656
pdouble(sys,0.2) count=1691
pdouble(idle,97.9) count=1728
pdouble(iowait,0.0) count=1766
pdouble(hardirq,0.1) count=1805
................
thank you for all
Hi Sorry for the delay - on holiday.
I have not tested njmon on ancient RHEL versions like RHEL5 and RHEL6 :-)
I assume you have recompiled the binaries for these Linux versions.
Please confirm.
It ends within a few minutes is rather vague when njmon is sending data just once a minute.
I want to know how many records were saved to the InfluxDB.
1 Can you use njmon -s 2 . . .
and actively watch with ps the length of time the njmon runs for?
You problem scenario is the most complex - let us try simple combinations to isolate the problem.
2 Can you confirm that if you run njmon on these older RHEL version endpoints hat it works OK for the simple case of saving the data to a local file and not using the collector? Once a minute for an hour.
3 Can you confirm that if njmon is running on RHEL7 and to the collector that that works OK all day?
4 Can you try the old RHEL endpoints to collector without using the "don't save a JSON file" option when starting the collector?
5 We are on injector v15 now = njmon_to_InfluxDB_injector_15.py
Check you have set batch=False
6 Can you inject OK from the InfluxDB computer into InfluxDB to check the Injector is OK
njmon ..... | injector.py
7 Can you use njmon -s 30 -c 2880 .....
to check that its not a network time out issue.
I have had others report problems with RHEL5 networking that really are not my problem.
If RHEL7 works and RHEL5 does not it could be firewalls, security or RHEL bugs.
njmon and the collector is very simple striaght forward C code.
You could engage RHEL support.
Sorry for the amount of testing but "its not working" is not enough information for diagnostics.
You could use the ssh approach, Nigel
hello Nigel thank you very much for answering
Relieving the information requested, I started to perform a deeper debug
I could see that injector v14 y v15 uses os_release tag
[root@xxxxx njmoninfluxdb]# grep os_release injector.py_v14
os = "Linux " + sample["os_release"]["pretty_name"]
[root@xxxxx njmoninfluxdb]# grep os_release injector.py_v15
os_name = sample["os_release"]["name"]
os_base = os_name + " " + sample["os_release"]["version_id"]
os_long = sample["os_release"]["pretty_name"]
[root@xxxxx njmoninfluxdb]#
njmon of rhel7 (data file json) contain this information but os_release no in rhel5 and rhel6
in njmon_linux_v22.c try fopen /etc/os-release but in redhat 5 and redhat 6 this file does not exist
void etc_os_release()
{
static FILE *fp =0;
char buf[1024+1];
}
for test the same data could be extracted from
cat /etc/redhat-release | awk -F release '{print "NAME=\""$1"\""}' > /etc/os-release
cat /etc/redhat-release | awk -F release '{print "VERSION=\""$2"\""}' >> /etc/os-release
cat /etc/redhat-release | awk -F release '{print $2}' | awk '{print "VERSION_ID=\""$1"\""}' >> /etc/os-release
echo "PRETTY_NAME=\"
cat /etc/redhat-release\"" >> /etc/os-releaseI created and populated this file and the tests were successful with injector v14
I wanted to ask you if it is possible that you can include in the version njmon_linux_v23.c in the case of the rh5 and 6 take the information from the file /etc/redhat-release
thanks for everything again
Adrian Leonardo Pascual
Last edit: Pascual Adrian 2019-04-08
hello
this week I will be testing with the injector v15
thanks for everything again
Adrian Leonardo Pascual
Last edit: Pascual Adrian 2019-04-08
I have added the RHEL5 and RHEL6 support via the use of /etc/redhet-release as you suggested.
I am adding other stats to njmon for Linux at the moment and hope to release thi all very soon.
Sorry, I have neglected this bug report.
We have many new releases since and many bug fixes - please move up the latest version.
I will close this bug report.