Open up you Notifications by going to Events > Triggers > Notifications double click on the email alert, or add one. Then go to content and add the following wherever you want the IP to show up in the email message.
${device/manageIp}
Open up you Notifications by going to Events > Triggers > Notifications double click on the email alert, or add one. Then go to content and add the following wherever you want the IP to show up in the email message.
${device/manageIp}
Ran into an issue where I was not able to list the installed ZenPacks and Zenoss was having issues starting. I think it was due to a ZenPack having issues and not being installed properly.
Drop into the container
serviced service shell -i -s FixZenpack zope bash
Change user and cd to ZenPack directory
su zenoss cd /opt/zenoss/ZenPacks
Once there, remove the offending ZenPack. Replace ZENPACK.egg with the ZenPack
rm -rf ./ZENPACK.egg
Example:
rm -rf ./ZenPacks.zenoss.MikroTik-1.1.1.egg
Exit out of the container.
exit exit
You can also hit ctrl+d twice.
Commit the Container
serviced service shell -i -s FixZen zope bash
Restart the Zenoss.Core Service
service service restart Zenoss.Core
To remove a ZenPack on Zenoss 5.1 and later, you are going to need to stop the zenoss services, restart a couple services that are needed to install the ZenPack, install the ZenPack, and then restart the Zenoss service.
Stop Zenoss.Core
serviced service stop Zenoss.Core
Make sure the service is stopped by running the following command. When it reports back the Zenoss is Stopped, then continue.
if ( serviced service status Zenoss.Core | awk '{print $3}' | grep -q Stopped) ; then echo "Zenoss is not running!" ; else echo "Zenoss is not Stopped!" ; fi
Or you can run this command, just make sure it says it is stopped.
serviced service status zenoss.core
Create a Snapshot
serviced service snapshot Zenoss.core
Start the following three services
serviced service start Infrastructure
zeneventserver
Zope
serviced service start Infrastructure
serviced service start zeneventserver
serviced service start Zope
List the ZenPacks that are currently installed.
serviced service run zope zenpack list
Remove the ZenPack. Replace “ZenPack.comunity.Zenpack” with the zenpack name from the previous command.
serviced service run zope zenpack-manager uninstall ZenPack.community.Zenpack
This is all contained in the Zenoss Upgrade guide.
Attach to Zope
serviced service attach zope/0 su zenoss
You can run the following commands to check on zenoss
zenossdbpack findposkeyerror zenrelationscan zencatalogscan
zenossdbpack : Quickly scans the Zope Object Database (ZODB) to provide a preliminary indication of the health of the database, and to determine whether the database needs to be compressed with “zenossdbpack” before upgrading.
findposkeyerror : Checks objects and their relationships, and provides options for fixing errors.
zenrelationscan : Checks only ZenRelations between objects.
zencatalogscan : Checks ZODB object catalogs, which speed up web interface access
Skip to the bottom if you just want to see all of the commands.
Make a temporary directory
mkdir /tmp/toolbox cd /tmp/toolbox
Download the tool box
wget https://github.com/zenoss/zenoss.toolbox/archive/master.zip chmod -R 777 /tmp/toolbox
Drop to a shell and switch user
serviced service shell -i -s ToolBox zope bash su zenoss
Install
easy_install /mnt/pwd/master.zip
Exit and commit container
exit exit serviced snapshot commit ToolBox
Restart Zope
serviced service restart zope
All the commands:
mkdir /tmp/toolbox && cd /tmp/toolbox wget https://github.com/zenoss/zenoss.toolbox/archive/master.zip chmod -R 777 /tmp/toolbox serviced service shell -i -s ToolBox zope bash su zenoss easy_install /mnt/pwd/master.zip exit exit serviced snapshot commit ToolBox serviced service restart zope
List Snapshots
service snapshot list
Roll back to snapshot
serviced snapshot rollback SNAPSHOT --force-restart
This is just a quick write on the hosts.allow and deny files. You can lookup “spawn” and/or “twist” for some advanced usage.
So to limit an IP address, or a IP range access to SSH, do the following
Deny all incoming request for SSH
Edit the “hosts.deny” file
vi /etc/hosts.deny
add the following line
sshd : ALL
Now edit “hosts.allow” and allow the client IP, or IP range to access SSH
vi /etc/hosts.allow
add the following line to allow a single IP
sshd : 192.168.1.182
If you want to allow the whole subnet, then replace the above line with this one
sshd : 192.168.1.
hosts.allow overrides hosts.deny. So you deny everything and then allow exceptions.
Problem: Volume goes from mute to 100% with very little ability to adjust it.
The following command should work on any Linux computer that is running alsa.
alsactl init
To install a ZenPack on Zenoss 5.1 and later, you are going to need to stop the zenoss services, restart a couple services that are needed to install the ZenPack, install the ZenPack, and then restart the Zenoss service.
Stop Zenoss.Core :
serviced service stop
Make sure the service is stopped by running the following command. When it reports back the Zenoss is Stopped, then continue.
if ( serviced service status Zenoss.Core | awk '{print $3}' | grep -q Stopped) ; then echo "Zenoss is not running!" ; else echo "Zenoss is not Stopped!" ; fi
Or you can run this command, just make sure it says it is stopped.
serviced service status zenoss.core
Create a Snapshot
serviced service snapshot Zenoss.core
Start the following three services
serviced service start Infrastructure
zeneventserver
Zope
serviced service start Infrastructure
serviced service start zeneventserver
serviced service start Zope
Change directory to tmp, make sure you put the zenpack in /tmp
cd /tmp
Install the Zenpack
serviced service run zope zenpack-manager install *.egg
Example:
serviced service run zope zenpack-manager install ZenPacks.zenoss.MikroTik-1.1.1.egg
Restart the Zenoss Service
serviced service restart zenoss.core
Log into Zenoss and check it.
The examples given here are for modifying the wlan0 interface. Replace wlan0 with the interface you are configuring. i.e. (eth0,wlan1)
Method 1
This was the typical way to add a static IP address to a Pi, if you have issues with this, then try Method 2.
sudo vi /etc/network/interfaces
In the file it is pretty easy to see which lines control which interface, find the lines that control wlan0 (or the interface your configuring) and change/add to look like below.
iface wlan0 inet static address 192.168.42.109 netmask 255.255.255.0 gateway 192.168.42.1
Save the file, reboot, and the Pi should come up with the new static IP.
Method 2
It looks like on the newer versions of Raspbian, the above method does not work anymore, so now you have to edit the following file
sudo vi /etc/dhcpcd.conf
and add the following lines.
interface wlan0 static ip_address=192.168.42.109/24 static routers=192.168.42.1 static domain_name_servers=192.168.42.1
If you just need to assign a static IP address, to the device, because it is going to be setup as a hotspot or something, you can get away with the following.
interface wlan0 static ip_address=192.168.42.1/24
If you run into issues with it not assigning the address, check the /etc/network/interfaces file and make sure that the line that starts with “iface wlan0” says manual at the end and not static. If it says “iface wlan0 inet static”, change it to “iface wlan0 inet manual”